1. add the test for "seconds"
2. since the default value for "style" is "long", baseStyle for GetDurationUnitOptions is "long" and therefore the
last argument in testOption should be "long"
3. the valid values for "days" does not contains "numeric", and "2-digit". remove them.
4. the valid values for "milliseconds", "microseconds" and "nanoseconds" does not contains "2-digit". remove it.
See https://tc39.es/proposal-intl-duration-format/#table-duration-components about the valid value
notice the last colum is for "Digital Default" while the baseStyle is "digital" but the set up does not set it that way, the default value for "style" is "long" as in
```
13. Let style be ? GetOption(options, "style", "string", « "long", "short", "narrow", "digital" », "long").
```
of https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat
* Sync to PR 121
Change default from "long" to "short"
Due to the TZDB's recent merging of time zones whose pre-1970 data was
different but post-1970 have been the same, this test is going to start
failing on implementations with up-to-date time zone data (because the
Europe/Amsterdam time zone was absorbed into Europe/Brussels in the latest
update.)
It's on our to-do list to remove all dependencies on IANA time zones from
the Temporal tests in staging/,
(see https://github.com/tc39/test262/issues/3649#issuecomment-1232326175)
but this one is more urgent.
This adds an object, TemporalHelpers.ISO, which has methods that return
arrays of various ISO strings. The idea is to deduplicate more string
tests into methods on this object.
This implements the normative change in
https://github.com/tc39/proposal-temporal/pull/2287 which reached
consensus at the July 2022 TC39 meeting.
It adds tests that ensure that PlainTime strings which require a T
designator for disambiguation, are not disambiguated by adding a calendar
annotation.
This implements the normative change in
https://github.com/tc39/proposal-temporal/pull/2284 which reached
consensus at the July 2022 TC39 meeting.
It adds tests that ensure strings like HHMM-UU[TZ] and HHMMSS[TZ] do not
require a disambiguating T separator, even if HHMM-UU and HHMMSS would by
themselves.
This implements the normative change in
https://github.com/tc39/proposal-temporal/pull/2344 which reached
consensus at the July 2022 TC39 meeting.
It adds a test that catches a corner case in Duration.prototype.round().
For completeness, as we are doing in newer brand checking tests such as
those of Temporal, call these getters with a function object and a bigint
as the receiver.
Suggested in https://github.com/tc39/test262/pull/3614/files#r929662337
Now that we have a staging directory, we can add the old-style tests from
proposal-temporal and avoid having to sync PRs across two repositories
when we convert them to test262 style.
Ms2ger wrote a script to convert them to be executable with the test262
harness, and this is the result of running that script on the remaining
Temporal.Instant tests in proposal-temporal.
More tests of other Temporal types to follow.
The intention of this test is to ensure that all built-in properties of
the global object are also exposed on the ShadowRealm's global object,
without penalizing implementations that don't have all of them
implemented.
Notably, SharedArrayBuffer may still not be (re-)enabled in all
circumstances.
This implements the normative change in
https://github.com/tc39/proposal-temporal/pull/2269 which reached
consensus at the July 2022 TC39 meeting.
There was already a test for PlainDate for this topic, which needs to be
adjusted to accommodate the normative change. Tests for PlainDateTime and
ZonedDateTime did not yet exist, so add new ones based on the PlainDate
test.
There are already tests to reject negative day lengths, so we can simply
remove these other tests.
Also remove a misleading comment ("Test negative divisor"), because the
test following the comment actually uses a positive divisor.
Temporal tests written for the SpiderMonkey implementation. Mostly
covers edge cases around mathematical operations and regression tests
for reported spec bugs.
This adds several tests for values that should be produced by the time
zone database and should not be subject to change in the future. This
tests basic functionality of TimeZone.getPlainDateTimeFor with an IANA
time zone database.