Skip to content

Commit 3d23d68

Browse files
author
Nicole Garcia
committed
TT-665 clean code
1 parent 385a8ae commit 3d23d68

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/app/modules/reports/components/time-range-form/time-range.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ describe('Reports Page', () => {
116116
});
117117

118118
it('triggers onSubmit with the form status valid', () => {
119+
const valid = component.reportForm.valid;
119120
spyOn(component, 'onSubmit');
120-
let valid = component.reportForm.valid;
121+
122+
121123
component.setInitialDataOnScreen();
122124

123125
expect(valid).toBeTruthy();

src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ describe('EntryFieldsComponent', () => {
362362
});
363363

364364
it('activites are ordered using the payload of the action', () => {
365-
const listActivities = [
365+
const activities = [
366366
{
367367
id: '001',
368368
name: 'Meeting',
@@ -380,7 +380,7 @@ describe('EntryFieldsComponent', () => {
380380
},
381381
];
382382

383-
const listActivitiesOrdered = [
383+
const activitiesOrdered = [
384384
{
385385
id: '002',
386386
name: 'ABC',
@@ -397,15 +397,16 @@ describe('EntryFieldsComponent', () => {
397397
description: 'Some description'
398398
},
399399
];
400+
400401
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
401402
const action = {
402403
type: ActivityManagementActionTypes.LOAD_ACTIVITIES_SUCCESS,
403-
payload: listActivities,
404+
payload: activities,
404405
};
405406

406407
actionSubject.next(action);
407408

408-
expect(component.activities).toEqual(listActivitiesOrdered);
409+
expect(component.activities).toEqual(activitiesOrdered);
409410
});
410411

411412
it('LoadActiveEntry is dispatchen after LOAD_ACTIVITIES_SUCCESS', () => {

0 commit comments

Comments
 (0)