6984 Commits

Author SHA1 Message Date
Daniel Minor
c2e3e37b68
Move WeakMap.prototype.getOrInsert tests from staging to built-ins (#4476)
* Fix esid and remove noStrict

* Fixup length.js and returns-value-if-key-is-not-present-symbol-key.js
2025-05-15 11:59:43 -07:00
André Bargull
1049f77ba3 Ensure typed array length is retrieved early in Atomics.{notify,wait} 2025-05-15 14:13:35 +02:00
Philip Chimento
37ebe00a15 Remove usage of Object.hasOwn in helper files
Instead use the easily available old-fashioned way, calling the method
on Object.prototype.
2025-05-15 11:42:44 +02:00
André Bargull
49a4e1e7c8 Fix copy-paste errors in Atomics tests 2025-05-15 11:18:46 +02:00
Ujjwal Sharma
453887559d Add 'notation' option to PluralRules tests and update related assertions
Refs: https://github.com/tc39/ecma402/pull/989
2025-05-14 10:43:30 -07:00
Philip Chimento
8fa9d38753
Temporal: Make gregory week numbers undefined (#4467) 2025-05-14 13:20:36 -04:00
Philip Chimento
118db52dd4
Temporal: Add coverage for getTimeZoneTransition edge cases (#4466)
getTimeZoneTransition return values should always correspond with UTC
offset transitions, not with time zone metadata changes such as making
DST permanent or updating abbreviation strings.

See: https://github.com/tc39/proposal-temporal/issues/3105
2025-05-14 13:04:43 -04:00
Philip Chimento
20d4558f39
Temporal: Add test coverage for close-together time zone transitions (#4471)
Check that implementations correctly detect time zone transitions that
are close together. Additionally, test startOfDay() since the time zone
transitions in Brazil occur at midnight.

See https://github.com/tc39/proposal-temporal/issues/3110
2025-05-14 12:27:19 -04:00
Richard Gibson
25278a150d
harness: Add a verifyCallableProperty helper (#4468) 2025-05-14 12:08:11 -04:00
Sosuke Suzuki
5e201642db Add tests for rejected %AsyncIteratorPrototype%.@@asyncDispose 2025-05-14 08:37:17 -07:00
Daniel Minor
2e59aad8d1
Move Map.prototype.getOrInsert tests from staging (#4472)
* Move Map.prototype.getOrInsert tests from staging

* Fix esid and remove noStrict

* Add check for map.get(-0) to append-new-values-normalizes-zero-key.js
2025-05-12 13:27:39 -07:00
Richard Gibson
545df3a432
Fix front matter for test/intl402/Locale/prototype/region/prop-desc.js (#4475) 2025-05-08 18:53:11 -04:00
Nicolò Ribaudo
bcdafc269f
Increase coverage for dynamic import and top-level await (#4421) 2025-05-08 16:55:49 +02:00
Daniel Minor
93d63969bc
Add upsert tests (#4454)
These tests are currently being executed in SpiderMonkey as `non262` tests,
and were exported using the `test262-export.py` script. Linting errors
were then corrected.
2025-05-05 12:20:47 -07:00
Sosuke Suzuki
27622d7647 Use assertNativeFunction instead of simple regexp pattern 2025-04-29 13:57:47 +02:00
Philip Chimento
ac9ff9bf75 Add coverage for remapping of eras in Temporal dates
See note 2 on eras in CalendarResolveFields:
https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields

This behaviour was not yet covered by any test262 tests.

Based on Anba's tests from https://github.com/tc39/test262/pull/4080 but
with different behaviour.
2025-04-29 13:45:50 +02:00
Seokho Song
cba890eef0 add throw-type-error-before-custom-proto-access.js 2025-04-24 15:32:25 +02:00
brageh01
443f0d2e7f
Temporal: Reorganize calendar and wrong-type tests (#4415)
Changes made to:

- PlainDate
- PlainYearMonth
- ZonedDateTime
- PlainDateTime
- PlainMonthDay

Merged calendar-number.js and calendar-wrong-type.js, due to no special behaviour of number to be tested.

Extracted string tests to calendar-iso-string.js and renamed the file to calendar-invalid-iso-string.js, due to the contents of the file initially testing invalid ISO strings.

Closes #3873
2025-04-23 16:04:15 -07:00
Tim Chevalier
64237beb0d Fix annotations 2025-04-23 11:51:56 -07:00
Tim Chevalier
0e0bf3c6bd Fix locale 2025-04-23 11:51:56 -07:00
Tim Chevalier
2107067d2e Rewrite tests to check for substrings rather than checking the entire output against an expected string 2025-04-23 11:51:56 -07:00
Tim Chevalier
c3b2287d2b Temporal: Add test for different combinations of DateTimeFormat options
This test file adds tests for all types of Temporal objects and various
combinations of style options for Intl.DateTimeFormat.
2025-04-23 11:51:56 -07:00
Nicolò Ribaudo
eeacc18d05 Fix import defer test bugs 2025-04-23 10:55:52 -07:00
Philip Chimento
c3c318cf11 Temporal: Add coverage for weird PlainMonthDay leap day constrain case
If you have a leap day, such as February 29, and you get input such as
{ monthCode: "M02", day: 30 }, { overflow: "constrain" }, then you want
the day to be constrained to the leap day February 29, not February 28
as the maximum day would be in a common year. Add tests for this case
for each supported calendar.
2025-04-21 10:06:18 -07:00
Philip Chimento
fa0a3081bd Temporal: Increase coverage of dateStyle and timeStyle
Add coverage in particular for dateStyle: undefined and timeStyle:
undefined, and for dateStyle applying to PlainMonthDay/PlainYearMonth
which were not tested.
2025-04-21 10:06:18 -07:00
Lucas Mirelmann
34b0db5fb0 Escape syntax character in regex
Syntax characters need to be escaped when they are part of a regex.

https://tc39.es/ecma262/#prod-Atom
https://tc39.es/ecma262/#prod-PatternCharacter
2025-04-21 12:50:40 +02:00
Andreu Botella
c5257e6119
Test that string comparison is per-code-unit (#4457) 2025-04-18 11:57:19 +02:00
ExE Boss
5b7101ae71
Add more tests for Object.prototype.[[SetPrototypeOf]] (#4446) 2025-04-17 16:04:35 -07:00
Louay Bassbouss
8da5438d7a
Add WMAS Test Suite to Test262 Runners section in README (#4335)
Integrates Test262 ECMAScript tests into the WMAS Test Suite, built on WPT. Ensures Test262 results are compatible with the WPT format.
2025-04-17 14:25:03 -07:00
Philip Chimento
61fcd7bd56 Refer to testing plan guide in CONTRIBUTING.md
Hopefully this will catch the notice of proposal champions working on
tests for their stage 2.7 proposal.
2025-04-15 12:01:00 -07:00
Ioanna M. Dimitriou H
709c859484 Add testing plan guide to documentation. 2025-04-15 12:01:00 -07:00
Philip Chimento
7c4a7999f0 Fix time zone canonicalization behaviour in DateTimeFormat test
As of the Time Zone Canonicalization proposal which is stage 3, the
original time zone name should be preserved in Intl.DateTimeFormat
.prototype.resolvedOptions.

Add a separate test that uses Temporal.ZonedDateTime.prototype.equals
to test the canonicalization behaviour.
2025-04-14 09:31:55 -07:00
J. S. Choi
7cc98501d3
Add and rename Array.fromAsync thenable rejection test cases 2025-04-14 15:47:05 +00:00
Richard Gibson
afc3d1bce4 Refactor dayPeriod formatting tests to be robust to CLDR changes
Taken from Richard's suggestion in
https://github.com/tc39/test262/pull/4428#pullrequestreview-2691878561

Co-Authored-By: André Bargull <andre.bargull@gmail.com>
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-04-10 18:24:20 -07:00
Richard Gibson
cf4c281a38 Improve license linting
* Bump max year to $now + 1.
* Emit a more specific error for year range where a single year is expected.
2025-04-04 12:47:48 -04:00
Richard Gibson
2f937a61fd Update features/includes test linting to report all unused/unrecognized values
(rather than just the first)
2025-04-04 12:47:48 -04:00
Richard Gibson
1e2f389caa Avoid truncating test lint annotations
Fixes #4448
2025-04-04 12:47:48 -04:00
Ujjwal Sharma
4ba104a21c Add test case for non-continental time zones
Adds a test that verifies that Intl.supportedValuesOf('timeZones')
includes those timezones those don't correspond to any continent. This
includes the oceanic Etc/* timezones and UTC.

Fixes: https://github.com/tc39/ecma402/issues/778
2025-03-27 17:38:56 +01:00
Ujjwal Sharma
6e311e4fb2 Update link to chakra bug tracker 2025-03-26 14:30:50 -07:00
Ujjwal Sharma
8067480cf3 Remove chakra jobs from CI config 2025-03-26 14:30:50 -07:00
Ujjwal Sharma
ea1724093f Remove chakra npm scripts 2025-03-26 14:30:50 -07:00
Ujjwal Sharma
8f7c679b9a
Add a test for ecma402#877 time zone canonicalization (#4437) 2025-03-26 10:54:55 -04:00
Linus Groh
5de6fda53f Add Kiesel bug tracker to CONTRIBUTING.md 2025-03-25 12:19:07 -07:00
Kevin Ness
2e87ba7cb8 Add Boa to implementer list on CONTRIBUTING.md 2025-03-25 11:35:17 -07:00
Ujjwal Sharma
56e77d6325 Update link to test262-harness repo 2025-03-25 11:38:42 +01:00
André Bargull
c23091151f Prefer "islamic-tbla" over "islamic" for Hijri calendars
"islamic" is underspecified because it doesn't include any information
which location and algorithms should be used to approximate new moon
observations. Instead switch to "islamic-tbla".
2025-03-24 10:39:29 +01:00
André Bargull
c7bbdd435f Remove test data from other calendars 2025-03-24 10:36:18 +01:00
André Bargull
c9ab199907 Copy islamic-calendars.js into separate files for each calendar variant 2025-03-24 10:36:18 +01:00
André Bargull
f5bf9fdf2d Allow for implementation-defined Error properties
Various implementations (JSC, V8, SM) define additional properties on
Error instances. Adjust the test case to account for that.
2025-03-24 09:52:09 +01:00
André Bargull
ce7e72d210 Split addition-across-lunisolar-leap-months across calendars
Also remove unnecessary check for out-dated Chinese calendar data.
2025-03-19 13:51:31 +01:00