Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@flacoman91
Copy link
Contributor

reduce techical debt. get off momentjs since its deprecated and dayjs is better.

Fixed unit tests
added some validation to convert dashes to /

fix cypress test

bump to see if ci test  passes

export const DATE_RANGE_MIN = '2011-12-01T12:00:00.000Z'

export const DATE_VALIDATION_FORMAT = 'M/D/YYYY';
Copy link
Member

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.

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' )
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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!

@flacoman91 flacoman91 merged commit 17e410c into main Aug 24, 2022
@flacoman91 flacoman91 deleted the ans_migrate_moment branch August 24, 2022 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants