Skip to content

Commit 3ca87ff

Browse files
committed
fix: TT-259 Fixed bugs provided by sonarcloud
1 parent e8caafc commit 3ca87ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/modules/shared/components/details-fields/details-fields.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ describe('DetailsFieldsComponent', () => {
176176
expect(component.saveEntry.emit).toHaveBeenCalledTimes(0);
177177
});
178178

179-
[{ actionType: EntryActionTypes.CREATE_ENTRY_SUCCESS }, { actionType: EntryActionTypes.UPDATE_ENTRY_SUCCESS }].map(
179+
[{ actionType: EntryActionTypes.CREATE_ENTRY_SUCCESS }, { actionType: EntryActionTypes.UPDATE_ENTRY_SUCCESS }].forEach(
180180
(param) => {
181181
it(`cleanForm after an action type ${param.actionType} is received`, () => {
182182
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
@@ -247,7 +247,7 @@ describe('DetailsFieldsComponent', () => {
247247
{ select_activity_id: 'fc5fab41-a21e-4155-9d05-511b956ebd07', expected_size_activities: 3, title: 'active' },
248248
{ select_activity_id: 'fc5fab41-a21e-4155-9d05-511b956ebd08', expected_size_activities: 4, title: 'inactive' },
249249
];
250-
activitiesParams.map((param) => {
250+
activitiesParams.forEach((param) => {
251251
it(`should emit ngOnChange to set ${param.expected_size_activities} activities for select (${param.title} time entry clicked)`, () => {
252252
component.entryToEdit = { ...entryToEdit, activity_id: param.select_activity_id };
253253
spyOn(component.entryForm, 'patchValue');
@@ -592,7 +592,7 @@ describe('DetailsFieldsComponent', () => {
592592
expectedTimeDiff: '00:00',
593593
},
594594
];
595-
diffParams.map((param) => {
595+
diffParams.forEach((param) => {
596596
it(`if [start_date, start_hour] and [end_date, end_hour] diff is ${param.case}`, () => {
597597
component.entryForm.setValue({ ...formValues, ...param.entryDates });
598598
const timeDiff = component.getTimeDifference();

0 commit comments

Comments
 (0)