-
Notifications
You must be signed in to change notification settings - Fork 361
Properly normalize duration values #1523
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
@@ -30,7 +30,8 @@ | |||
"e2e-local": "CYPRESS_E2E_TEST_ENV=\"local\" cypress run", | |||
"e2e-local-open": "CYPRESS_E2E_TEST_ENV=\"local\" cypress open", | |||
"format": "prettier-eslint --write 'src/**/!(*.min).{js,jsx,ts,tsx,css,json}' 'e2e_tests/**/*.{js,jsx,ts,tsx,css,json}' 'scripts/**/*.{js,jsx,ts,tsx,css,json}' 'build_scripts/**/*.{js,jsx,ts,tsx,css,json}'", | |||
"jest": "jest --coverage", |
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.
This will affect CI, so we should either just add a new jest-no-cov
script and leave the existing jest
as it was, or else we should check what the change will mean/do on CI.
@@ -443,9 +444,13 @@ export function mapNeo4jValuesToPlainValues(values: any): any { | |||
*/ | |||
function neo4jValueToPlainValue(value: any) { | |||
switch (get(value, 'constructor')) { | |||
case neo4j.types.Duration: |
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.
Can we move this code that converts the value to a duration string to a shared util function or something?
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.
Done!
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.
LGTM
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.
Approving, although hopefully removing the coverage from CI won't bite us later...
Changes:
Before:

After:

Preview @ https://format_duration.surge.sh