-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use date strings instead of Dates in survey objects
to make sure timezones with Date/moment do not shift days
- Loading branch information
Showing
6 changed files
with
55 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ describe('BaseInterview', () => { | |
expect(interview._startedAt).toEqual(new Date('2023-10-05 02:34:55')); | ||
expect(interview._updatedAt).toEqual(new Date('2023-10-06 07:00:23')); | ||
expect(interview._completedAt).toEqual(new Date('2023-10-07 09:12:00')); | ||
expect(interview.assignedDate).toEqual(new Date('2023-10-03')); | ||
expect(interview.assignedDate).toEqual('2023-10-03'); | ||
expect(interview.contactPhoneNumber).toEqual('+1 514-999-9999'); | ||
expect(interview.contactEmail).toEqual('[email protected]'); | ||
expect(interview._language).toEqual('en'); | ||
|
@@ -109,7 +109,7 @@ describe('BaseInterview', () => { | |
_startedAt: new Date(), | ||
_updatedAt: new Date(), | ||
_completedAt: new Date(), | ||
assignedDate: new Date(), | ||
assignedDate: '2023-01-01', | ||
constactEmail: '[email protected]', | ||
contactPhoneNumber: '514-999-9999 #999', | ||
_language: 'fr', | ||
|
@@ -144,7 +144,7 @@ describe('BaseInterview', () => { | |
new Error('BaseInterview validateParams: _language should be a string of two letters'), | ||
new Error('BaseInterview validateParams: _source should be a string'), | ||
new Error('BaseInterview validateParams: _isCompleted should be a boolean'), | ||
new Error('BaseInterview validateParams: invalid assignedDate'), | ||
new Error('BaseInterview validateParams: assignedDate should be a valid date string'), | ||
new Error('BaseInterview validateParams: invalid _startedAt'), | ||
new Error('BaseInterview validateParams: invalid _completedAt'), | ||
new Error('BaseInterview validateParams: invalid _updatedAt'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters