Commit Graph

4842 Commits

Author SHA1 Message Date
Peter Klecha 2a4c458002 Update test/built-ins/Promise/withResolvers/ctx-ctor.js
Co-authored-by: Linus Groh <mail@linusgroh.de>
2023-09-08 16:31:50 -07:00
Peter Klecha 998f811e58 Update test/built-ins/Promise/withResolvers/ctx-non-ctor.js
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2023-09-08 16:31:50 -07:00
Peter Klecha 15e0933cb5 Update test/built-ins/Promise/withResolvers/result.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-08 16:31:50 -07:00
Peter Klecha 8f8aa971d8 Update test/built-ins/Promise/withResolvers/result.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-08 16:31:50 -07:00
Peter Klecha ab0d665192 Update test/built-ins/Promise/withResolvers/result.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-08 16:31:50 -07:00
Peter Klecha d2ac342089 include esids 2023-09-08 16:31:50 -07:00
Peter Klecha 81ba258677 add tests for Promise.withResolvers proposal 2023-09-08 16:31:50 -07:00
Philip Chimento e04e1c1a39 Temporal: Fix front matter of Temporal/ZonedDateTime/p/round/order-of-operations.js 2023-09-08 09:38:14 -07:00
Philip Chimento 6371be8338 Temporal Helpers: Add harness tests for DST sample time zone
Just to make sure the time zone arithmetic matches the actual time zone
that it is based on.
2023-09-08 09:38:14 -07:00
Philip Chimento d03ed25a21 Temporal Helpers: Refactor sample time zone tests in harness tests
These two can be combined into one test, since they are very similar. This
will allow testing the sample DST time zone as well, which is not yet
tested.
2023-09-08 09:38:14 -07:00
Philip Chimento d4f49b84ab Temporal: Update outdated test descriptions 2023-09-08 09:38:14 -07:00
Philip Chimento 6c16577f34 Temporal: Remove unused variables
These are also leftovers from the recent refactor, I think.
2023-09-08 09:38:14 -07:00
Philip Chimento ce92940645 Temporal: Improve various assertion messages
Some of these were overlooked in a recent big refactor.
2023-09-08 09:38:14 -07:00
Mathias Bynens 1a0b9d23f2 Add tests ensuring the latest Unicode Emoji standard is being followed
The behavior of `/\p{RGI_Emoji}/v` and other properties of strings depends on the Unicode & Emoji version being used in the JavaScript engine. This patch adds tests verifying new additions to `RGI_Emoji` for each release of the Unicode Emoji standard are correctly matched.
2023-08-28 16:31:57 +02:00
André Bargull e27c9f690c Add DurationFormat test for negative durations 2023-08-28 16:18:47 +02:00
André Bargull fa3581986f Add test for numeric hours with zero minutes and non-zero seconds 2023-08-28 16:18:47 +02:00
André Bargull c9548956f9 Test exact precision for DurationFormat
`Intl.DurationFormat` is currently spec'ed to use unlimited precision.

See: https://github.com/tc39/proposal-intl-duration-format/issues/157
2023-08-28 16:18:47 +02:00
André Bargull 71091f1541 Use simplified PartitionDurationFormatPattern to computed expected results 2023-08-28 16:18:47 +02:00
André Bargull 4da0b8f005 Remove test which duplicates 'style-default-en.js' 2023-08-28 16:18:47 +02:00
Jordan Harband eb613f6891 use proper isConstructor check for recently added ArrayBuffer/SharedArrayBuffer tests 2023-08-25 15:31:27 +02:00
Michael Ficarra 9efb4f8e53 update iterator helpers tests that passed even in noncompliant impls 2023-08-24 13:09:05 -07:00
André Bargull e273cd470a Add tests for recursively calling IteratorHelper generators 2023-08-24 12:44:04 -07:00
Kevin Gibbons 8a7b686502 add test for regexp matching with zero-length quantified matches 2023-08-24 10:47:01 +02:00
Yusuke Suzuki 04a84fc5fd Fix test/intl402/DurationFormat/prototype/format/style-digital-en.js
The expected output is not aligned: it is missing comma. This change fixes it.
2023-08-21 15:37:04 -07:00
Aditi bdddd9e2d2 Update test for monthDayFromFields() 2023-08-21 09:14:43 -07:00
Philip Chimento c30aff08af Temporal: Copy options object in Plain{Date,MonthDay,YearMonth}.{from,p.with} 2023-08-16 14:49:15 -07:00
Philip Chimento 5ecb902a0a Temporal: Copy options object in {Plain,Zoned}DateTime.{from,p.with} 2023-08-16 14:49:15 -07:00
Philip Chimento 01a49502f6 Temporal: Get receiver fields from a PlainDateTime in ZonedDateTime.with() 2023-08-16 14:49:15 -07:00
Philip Chimento 4155594804 Temporal: Get receiver's time units from internal slots in with() 2023-08-16 14:49:15 -07:00
Philip Chimento 4b4de778d4 Temporal: Limit allowed values for Calendar.fields to date units 2023-08-16 14:49:15 -07:00
Philip Chimento c372de0bbe Temporal: Avoid recalculating offset ns after GetPlainDateTimeFor 2023-08-16 14:49:15 -07:00
Justin Grant 0c87a86b58 Disallow sub-minute annotations in Instant strings
Adds tests that verify that Instant strings cannot include offset time
zone annotations with sub-minute units.

Also removes a few staging test cases that, due to a polyfill bug, were
incorrectly passing.
2023-08-10 15:45:34 +02:00
Justin Grant 2e4e0e6b8e Test ISO sub-minute offsets, incl. trailing zeroes
Plugs a test hole where we were not fully testing ISO strings with
sub-minute offsets, in particular those with trailing zeroes.
2023-08-10 10:13:27 +02:00
Ben Allen 1499c2c62b updated to contain ES5 version of RGN suggestion 2023-08-09 12:18:42 -07:00
Justin Grant 66f3959c14 Remove a sub-minute offset test
There was one remaining Temporal test that was parsing an ISO string
with a sub-minute offset into a Temporal.TimeZone. A polyfill bug was
allowing this test case to pass, even though after
tc39/proposal-temporal#2607 it should have failed.

This commit removes the bad test case.
2023-08-09 11:37:39 -07:00
Justin Grant 2e1d7a72ff Test rejecting ISO strings with subminute offsets
This commit verifies that ISO strings with sub-minute offsets cannot
be parsed into time zone identifiers. This was a change introduced in
the recently-merged tc39/proposal-temporal#2607, but tests for this case
were missing from #3862 (the tests for that PR).

I noticed in codecov results on an unrelated PR that this case wasn't
being tested, so fixing that mistake now.
2023-08-09 11:37:39 -07:00
Justin Grant 29dde1ce0e Tests for new API Temporal.TimeZone.p.equals 2023-08-07 15:01:16 -07:00
Justin Grant 90f5cac987 Add Intl.DTF tests for proposal-canonical-tz 2023-08-07 15:01:16 -07:00
Justin Grant a53f190e1f Add ZonedDateTime tests for proposal-canonical-tz 2023-08-07 15:01:16 -07:00
Justin Grant 3032242269 Test Temporal.TimeZone ID case normalization 2023-08-07 15:01:16 -07:00
Justin Grant 5d261f3641 Fix existing tests broken by proposal-canonical-tz 2023-08-07 15:01:16 -07:00
Ben Allen a5e2cf2433
Update InitializeDateTimeFormat references to new CreateDateTimeFormat to reflect recent editorial change (#3889) 2023-08-07 17:01:48 +02:00
Ben Allen 5d9dc53a19
Test invalid Intl.DateTimeFormat options when dateStyle/timeStyle is set (#3886)
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2023-08-07 16:32:44 +02:00
André Bargull 21c3097f92 Update tests for PR "Read date-time options only once when creating DateTimeFormat objects"
Update tests for PR tc39/ecma402#709.
2023-07-27 21:08:25 +02:00
Justin Grant 425716345f Test Temporal.Instant w/ trailing zeroes in offset
I noticed a small test hole in codecov: we weren't testing
Temporal.Instant parsing with trailing zeroes in the offset.
I also didn't see fractional offset testing, so added that too.
2023-07-27 12:52:25 +02:00
Justin Grant c84752415d Test PlainTime without full ISO strings
Codecov showed that PlainTime strings like "09:00:00Z[UTC]" or
"09:00:00Z" were not being tested. This commit fills that gap.

It'd probably be good to make similar changes for other Plain* types,
but Codecov didn't complain about them so they may be covered
via other tests so it was less urgent.
2023-07-25 09:36:18 +02:00
Justin Grant e8bbfe704f Ensure that non-string TimeZone IDs will throw
This commit fills a test hole found by Codecov: we weren't checking for
the case of a custom time zone whose `id` property returns a non-string
value.

Note that the `id` property is only read in a few places, all on the
ZonedDateTime prototype: `until`, `since`, `equals`, `toString`,
`toLocaleString`, `toJSON`, and `timeZoneId`.
2023-07-25 09:30:37 +02:00
Frank Yung-Fong Tang 92a9eca159
Add tests for ECMA402 PR 786 (#3875)
https://github.com/tc39/ecma402/pull/786

This ECMA402 PR 786 reached TC39 consensus in the July 2023 meeting
2023-07-24 17:47:19 +02:00
Justin Grant 6f146e6f30 Limit offset time zones to minute precision
Modify/add tests for https://github.com/tc39/proposal-temporal/pull/2607
2023-07-18 17:44:19 +02:00
Justin Grant 60e475248d Tests for Temporal PR #2574
Edits Temporal tests to account for changes in
https://github.com/tc39/proposal-temporal/pull/2574.

This PR stops coercing non-string primitive inputs to strings
in Temporal methods, to avoid cases where numbers
are coerced to syntactically valid but often unexpected
string results.
2023-07-18 17:09:04 +02:00