Ensure that no tests outside of intl402/ require IANA time zones#3377
Merged
Ensure that no tests outside of intl402/ require IANA time zones#3377
Conversation
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
approved these changes
Jan 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.