52 Commits

Author SHA1 Message Date
Jesse Alama
f3c485d6da Ensure branding tests for Temporal.Calendar and TimeZone methods
https://github.com/tc39/proposal-temporal/pull/1693 added checks for the
receiver of certain Temporal.Calendar and Temporal.TimeZone methods. Add
branding tests for these methods, similar to the already existing branding
tests.

This was a normative change that achieved consensus at the December 2021
TC39 meeting.
2022-02-08 15:43:25 -05:00
Jesse Alama
7d82f8ac63 Add tests for invalid extended year "-000000"
https://github.com/tc39/proposal-temporal/issues/1753 records the
consensus reached at the October 2021 TC39 meeting to disallow "-000000"
as an extended year, both in Date.parse and Temporal. This adds tests for
the Temporal part of that.
2022-02-01 17:59:02 -05:00
James Wright
e87b0048c4 Include missing semicolons in Temporal tests. 2022-01-19 13:48:03 -05:00
Philip Chimento
0184842b09 Test rejection of "Z" UTC designators in Plain strings
Tests for the normative changes made to Temporal in
https://github.com/tc39/proposal-temporal/pull/1874
2021-12-14 13:39:19 -05:00
Justin Grant
6c2884eb9e Verify that Temporal.*.prototype isn't writeable 2021-12-14 13:38:14 -05:00
Philip Chimento
1d09acaac1 Fix not-callable getOffsetNansecondsFor tests
Unfortunately, in #3304 I made a last-minute mistake when I added the
uncallable value to the assertion message, and neglected to test it;
Symbols can't be converted to strings like that, so these tests would
fail. This fixes the assertion messages.
2021-11-30 14:36:59 -05:00
Philip Chimento
ae53326189 Test TypeError is thrown when getOffsetNanosecondsFor is not callable
Tests for the normative changes made to Temporal in
https://github.com/tc39/proposal-temporal/pull/1829
In a previous version of the specification, there was a fallback to the
intrinsic getOffsetNanosecondsFor when it was undefined.
2021-11-16 17:06:06 -05:00
Frank Yung-Fong Tang
61339fd294
Sync test of Temporal.Calendar.p*.fields to 1750 (#3188)
* Sync test  of Temporal.Calendar.p*.fields to 1750

https://github.com/tc39/proposal-temporal/pull

* add more test

* add more tests for T*.Calendar.p*.fields

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/repeated-throw.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Remove loop

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update long-input.js

* Update repeated-throw.js

* Update reverse.js

* ensure the implementation check the content

make sure the validation does not happen after the looping the generator

* add test to check all valid field value

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2021-10-05 23:03:07 -04:00
Philip Chimento
56e537b916 Consolidate duplicate tests
There were a few tests already in the tree that overlapped ones that I
added in the previous commit. I've consolidated these and taken
information from the deleted ones where applicable, and improved on the
autogenerated assertion messages.
2021-10-01 14:30:12 -04:00
Philip Chimento
77a34cf93f Add Temporal tests
This copies over the tests that previously existed in the
tc39/proposal-temporal repository.

For context, see thread starting at:
https://github.com/tc39/test262/issues/3002#issuecomment-926234480

In service of https://github.com/tc39/test262/issues/3002
2021-10-01 14:30:12 -04:00
Mike Pennisi
d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be9b487eb10156c03e2c00869e88cc9d, reversing
changes made to 50dd431dffe5cf86e9064a652d6b01dbbe542cf0. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
Philip Chimento
c7ca06acb2
Remove duplicate tests (#3222)
While working on adding the Temporal tests from tc39/proposal-temporal I
noticed that these tests tested the same thing as each of the branding.js
tests in the same directory. This removes the duplicate tests.
2021-09-30 20:17:12 -04:00
rwaldron
4847d9db5a chore: update test/**/*.js to use assert.compareArray wherever applicable 2021-09-24 12:58:15 -04:00
André Bargull
0181293d38 "era" and "eraYear" are ECMA-402 only properties.
Both properties are only present when ECMA-402 is supported.
2021-09-02 11:23:23 -07:00
Michael Dyck
9cb0746f52 Normalize some YAML
In some recently added tests, the `description` is a multi-line scalar
in flow notation. Change it to block notation.
2021-09-02 10:00:32 -04:00
Philip Chimento
45a913c057
Add branding tests from Temporal (#3138)
Closes: #3137

Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2021-08-11 12:31:23 -07:00
Rick Waldron
bb93efdb6b
Automated assertion message update (#3136)
This also required manually fixing the "actual" and "expected" order of many assert.sameValue(...) calls.
2021-08-10 10:40:04 -07:00
Frank Tang
86e23998e3 Add more tests 2021-08-06 18:31:47 -04:00
Frank Tang
88d1ede7d6 Split the test and add more tests 2021-08-06 18:31:47 -04:00
Frank Tang
bb4729126c Remove incorrect lines 2021-08-06 18:31:47 -04:00
Frank Tang
ee94a2ce7f fix directory name 2021-08-06 18:31:47 -04:00
Frank Tang
35850e5782 Add Temporal.Calendar.prototype.daysIn* tests. 2021-08-06 18:31:47 -04:00
Rick Waldron
e6c21464f5 Automated feature flag update 2021-08-05 18:44:17 -04:00
Frank Tang
1c722a8158 fix comments 2021-08-05 18:31:44 -04:00
Frank Tang
a87f987e7f add more tests 2021-08-05 18:31:44 -04:00
Frank Tang
d554db9438 Fix YAML indent issue 2021-08-05 18:31:44 -04:00
Frank Tang
2d480d4c76 Fix directory name 2021-08-05 18:31:44 -04:00
Frank Tang
52bb16f9a5 Add tests for Temporal.Calendar.prototype.dayOf* 2021-08-05 18:31:44 -04:00
Frank Tang
97967a37b3 fix id 2021-08-05 18:31:06 -04:00
Frank Tang
6cc2d81dab Split to different files and test throwing Error 2021-08-05 18:31:06 -04:00
Frank Tang
b5a4033fcc Fix directory name 2021-08-05 18:31:06 -04:00
Frank Tang
932c931a70 Add tests for Temporal.Calendar.prototype.(year|month*|day) 2021-08-05 18:31:06 -04:00
Frank Tang
750ec2b581 Fix YAML 2021-08-05 18:30:13 -04:00
Frank Tang
8ebded4cfa use harness and add more tests 2021-08-05 18:30:13 -04:00
Frank Tang
7418ba62b1 rm throws-range-error.js 2021-08-05 18:30:13 -04:00
Frank Tang
b58e01afca Fix YAML 2021-08-05 18:30:13 -04:00
Frank Tang
721245be53 Fix directory name 2021-08-05 18:30:13 -04:00
Frank Tang
e17cc7b4bf Add test for Temporal.Calendar.prototype.dateUntil 2021-08-05 18:30:13 -04:00
Frank Tang
1a36125f25 Remove simple.js 2021-08-05 18:27:03 -04:00
Frank Tang
8f2434ba4d Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang
6ab8e86471 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00
Frank Tang
a585faf566 split simple into different files 2021-08-05 18:27:03 -04:00
Frank Tang
173684422c Added back fiels incorrectly removed 2021-08-05 18:27:03 -04:00
Frank Tang
df42e9a19b split into different add files 2021-08-05 18:27:03 -04:00
Frank Tang
f772019855 Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang
1195736914 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00
Frank Tang
bf1b3f585f Add abstract operation test for dateFromFields 2021-08-05 18:27:03 -04:00
Frank Tang
c0b3a5f074 Add test for abrupt completion for dateAdd 2021-08-05 18:27:03 -04:00
Frank Tang
6c077667fc Fix directory name 2021-08-05 18:27:03 -04:00
Frank Tang
4a34d84b20 Add test for Temporal.Calendar.p.date(Add|FromFields) 2021-08-05 18:27:03 -04:00