15 Commits

Author SHA1 Message Date
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
Ms2ger
dff7c70254 Avoid unrelated invalid input in PlainDate.from test. 2022-01-28 13:17:31 -05:00
Ms2ger
a46aecc12a Test PlainDate.from with more objects. 2022-01-24 13:35:39 -05:00
Ms2ger
6bf7d8207a Test functions as options in PlainDate.from. 2022-01-24 13:35:39 -05:00
Ms2ger
b81ce78746 Test PlainDate.from with a number. 2022-01-24 13:35:39 -05:00
Ms2ger
4ec469c68c Test PlainDate.from with various strings. 2022-01-24 13:35:39 -05:00
Ms2ger
6f689c6c19 Rename PlainDate/from/argument-string.js. 2022-01-24 13:35:39 -05:00
Ms2ger
6ee33f1c86 Test PlainDate.from with trailing junk in string argument. 2022-01-24 13:35:39 -05:00
Frank Yung-Fong Tang
9bfdf89edc Fix incorrect argument
2nd argument of TemporalHelpers.assertPlainDate is year, not Temporal.PlainDate object.
2022-01-07 13:14:27 -05:00
Ms2ger
7bfda9f10b Add tests for overflow in PlainDate.from(). 2022-01-04 09:26:28 -05:00
Ms2ger
aa77abd928 Add tests for limits in PlainDate. 2022-01-04 09:26:28 -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
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
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