Skip to content
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

Add test coverage for Temporal.ZonedDateTime.since/until #1140

Closed
ptomato opened this issue Nov 5, 2020 · 3 comments
Closed

Add test coverage for Temporal.ZonedDateTime.since/until #1140

ptomato opened this issue Nov 5, 2020 · 3 comments
Labels
Milestone

Comments

@ptomato
Copy link
Collaborator

ptomato commented Nov 5, 2020

Make sure that we have test coverage of reversibility with DST changes involved.

Given diffUntil = earlier.until(later, { largestUnit: 'days' }) and diffSince = later.since(earlier, { largestUnit: 'days' }), we need to test cases where:

  • diffUntil !== diffSince
  • earlier.add(diffUntil) == later
  • later.subtract(diffUntil) != earlier
  • later.subtract(diffSince) == earlier
  • earlier.add(diffSince) != later
@ptomato ptomato added the non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! label Feb 18, 2021
@ptomato ptomato added this to the Next milestone Feb 18, 2021
@ptomato ptomato added test262 and removed non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! labels Jul 3, 2021
@ptomato
Copy link
Collaborator Author

ptomato commented Jan 2, 2023

I'll move this to tc39/test262#3002.

@justingrant
Copy link
Collaborator

FWIW, if I remember correctly there are some of these tests in the ZDT demitasse tests. So before writing new tests, we may want to look through the existing ZDT and staging tests to see if there's any existing tests that can be used. I was going to add this comment to tc39/test262#3002 but wasn't sure where to put it!

@ptomato
Copy link
Collaborator Author

ptomato commented Jan 4, 2023

Good point. I added that comment to the checklist item in the test262 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants