Skip to content

Ensure that no tests outside of intl402/ require IANA time zones#3377

Merged
rwaldron merged 6 commits intotc39:mainfrom
ptomato:move-test-depending-on-intl-timezone
Jan 19, 2022
Merged

Ensure that no tests outside of intl402/ require IANA time zones#3377
rwaldron merged 6 commits intotc39:mainfrom
ptomato:move-test-depending-on-intl-timezone

Conversation

@ptomato
Copy link
Contributor

@ptomato ptomato commented Jan 12, 2022

As discussed in #3286, tests in built-ins/ should not require that an implementation supports IANA time zones, because only implementations that conform to ECMA-402 are required to support those.

This PR changes the existing tests in built-ins/ so that they only use offset time zones or the "UTC" named time zone, which all implementations are required to support. In cases where that actually meant that certain functionality was no longer covered by tests, I added new tests in intl402/ to cover it.

Also includes some minor formatting and consistency fixes that I encountered along the way.

This requires a few adjustments of time zone names and offsets in some
places. The only named time zone that is required to be supported by an
implementation not supporting ECMA-402 is "UTC".
Some of these tests have a larger variation of valid ISO strings that they
test, and others don't. Use the larger variation across all of these
files.
For cases in the previous commit that actually removed some functionality
from tests in built-ins/, add corresponding tests in intl402/ to preserve
test coverage of that functionality for hosts that do support Intl.
There were two cases where tests in intl402/ had some duplication of tests
that are in built-ins/ as well. Remove this duplication, and restrict the
intl402/ tests to testing things that can't be tested on all hosts.
@rwaldron rwaldron merged commit 631337b into tc39:main Jan 19, 2022
@ptomato ptomato deleted the move-test-depending-on-intl-timezone branch January 19, 2022 18:54
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.

2 participants