Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nizar-Rahme authored and Chi Nguyen committed Mar 11, 2019
1 parent 7937b88 commit 1bc2510
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion app/shared/form-fields/FormControl.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ describe('shared/form-fields/FormControl', () => {
});

test('contains the label text given in props', () => {
expect(getColWrapper().props().children).toEqual(expect.arrayContaining([defaultProps.label]));
expect(
getColWrapper().props().children
).toEqual(expect.arrayContaining([defaultProps.label]));
});

test('does not contain InfoPopover if info not given', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ describe('pages/resource/reservation-calendar/ReservationConfirmationContainer',
expect(actualProps.isAdmin).toBeDefined();
expect(actualProps.isEditing).toBeDefined();
expect(actualProps.isMakingReservations).toBe(defaultProps.isMakingReservations);
expect(actualProps.isPreliminaryReservation).toBe(defaultProps.resource.needManualConfirmation);
expect(
actualProps.isPreliminaryReservation
).toBe(defaultProps.resource.needManualConfirmation);
expect(actualProps.isStaff).toBeDefined();
expect(actualProps.onCancel).toBe(defaultProps.actions.cancelReservationEdit);
expect(actualProps.onClose).toBe(defaultProps.actions.closeConfirmReservationModal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ describe('shared/resource-type-filter/ResourceTypeFilterContainer', () => {
test('calls onUnselectResourceType if resource was on selected list', () => {
instance.handleClick(defaultProps.selectedResourceTypes[0]);
expect(defaultProps.onUnselectResourceType.callCount).toBe(1);
expect(defaultProps.onUnselectResourceType.lastCall.args).toEqual([defaultProps.selectedResourceTypes[0]]);
expect(
defaultProps.onUnselectResourceType.lastCall.args
).toEqual([defaultProps.selectedResourceTypes[0]]);
expect(defaultProps.onSelectResourceType.callCount).toBe(0);
});

test('calls onSelectResourceType if resource was not on selected list', () => {
instance.handleClick(defaultProps.resourceTypes[-1]);
expect(defaultProps.onSelectResourceType.callCount).toBe(1);
expect(defaultProps.onSelectResourceType.lastCall.args).toEqual([defaultProps.resourceTypes[-1]]);
expect(
defaultProps.onSelectResourceType.lastCall.args
).toEqual([defaultProps.resourceTypes[-1]]);
expect(defaultProps.onUnselectResourceType.callCount).toBe(0);
});
});
Expand Down
16 changes: 12 additions & 4 deletions app/state/recurringReservations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ describe('state/recurringReservations', () => {
const state = {
recurringReservations: { baseTime: { begin: '', end: '' } },
};
expect(recurringReservations.selectBaseTime(state)).toEqual(state.recurringReservations.baseTime);
expect(
recurringReservations.selectBaseTime(state)
).toEqual(state.recurringReservations.baseTime);
});
});

Expand All @@ -411,7 +413,9 @@ describe('state/recurringReservations', () => {
const state = {
recurringReservations: { frequency: 'days' },
};
expect(recurringReservations.selectFrequency(state)).toBe(state.recurringReservations.frequency);
expect(
recurringReservations.selectFrequency(state)
).toBe(state.recurringReservations.frequency);
});
});

Expand All @@ -420,7 +424,9 @@ describe('state/recurringReservations', () => {
const state = {
recurringReservations: { numberOfOccurrences: 12 },
};
expect(recurringReservations.selectNumberOfOccurrences(state)).toBe(state.recurringReservations.numberOfOccurrences);
expect(
recurringReservations.selectNumberOfOccurrences(state)
).toBe(state.recurringReservations.numberOfOccurrences);
});
});

Expand All @@ -431,7 +437,9 @@ describe('state/recurringReservations', () => {
reservations: [{ begin: '', end: '' }, { begin: '', end: '' }],
},
};
expect(recurringReservations.selectReservations(state)).toEqual(state.recurringReservations.reservations);
expect(
recurringReservations.selectReservations(state)
).toEqual(state.recurringReservations.reservations);
});
});
});
Expand Down

0 comments on commit 1bc2510

Please sign in to comment.