-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(tests): tests for Opensearch components #1048
Conversation
Coverage Report
File Coverage
|
…st-opensearch-components
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.
Great work on simplifying
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.
Good stuff. Much much more readable
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.
If we're updating comments, would it be nice to have them in JSX doc so they show up when hovering over the function?
@@ -11,7 +11,9 @@ | |||
"devDependencies": {}, | |||
"dependencies": { | |||
"@18f/us-federal-holidays": "^4.0.0", | |||
"moment-timezone": "^0.5.45", |
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.
Good riddance
🎉 This PR is included in version 1.5.0-val.114 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
* added tests for opensearch components * removed custom written UTC handling and replaced it with `@date-fns/utc`
💬 Description / Notes
Working towards OY2-31569. Added test coverage for Opensearch components. Discovered issue with
offsetToUTC
andoffsetFromUTC
. Resolved them by adding@date-fns/utc
and@date-fns/tz
and using that provided functionality.🛠 Changes
moment
from shared-utils package.json@date-fns/utc
,@date-fns/tz
, anddate-fns
to shared-utils package.json@date-fns/utc
to react-app package.jsonoffsetToUTC
andoffsetFromUTC
with@date-fns/utc
in all the code and removed those testsseaToolFriendlyTimestamp
with functions from@date-fns/utc
anddate-fns
formatSeatoolDate
to usedate-fns
instead ofmoment
, so that we could removemoment
from the project entirelygetNextBusinessDayTimestamp
to use functions fromdate-fns
and@date-fns/tz
to convert the time to the NY timezone.Chipbar
component to use@date-fns
instead ofoffsetFromUTC
Chipbar
FilterableDateRange
to use@date-fns/utc
instead ofoffsetToUTC
andoffsetFromUTC
and to useUTCDate
objects instead ofDate
ContextState
fromOsProvider
so it was available in the tests