-
Notifications
You must be signed in to change notification settings - Fork 20
1764 - migrate momentjs -> dayjs #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fix cypress test bump to see if ci test passes
5e2abf3 to
301b8ed
Compare
|
|
||
| export const DATE_RANGE_MIN = '2011-12-01T12:00:00.000Z' | ||
|
|
||
| export const DATE_VALIDATION_FORMAT = 'M/D/YYYY'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add a comment above this line with a link to https://day.js.org/docs/en/display/format so it's clearer this is set by dayjs.
src/utils/__tests__/chart.spec.jsx
Outdated
| expect( res ).toContain( 'Date range: 7/14/2020 - ' ) | ||
| expect( res ).toEqual( 'Date range: 7/14/2020 - 9/30/2020' ) | ||
| // TODO: figure out why this doesn't work in CI | ||
| // expect( res ).toEqual( 'Date range: 7/14/2020 - 9/30/2020' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to do this in another PR or this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd do this in another one. as far as i could tell, I could never get this to work in CI even when it was using momentjs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, i took another look at this. Looks like some of the other cases were incorrect and i fixed up those tests and updated the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and it passes locally and in CI now!
reduce techical debt. get off momentjs since its deprecated and dayjs is better.
Fixed unit tests
added some validation to convert dashes to /