mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 21:14:45 +02:00
Temporal: Remove Calendar and TimeZone objects from "wrong-type" tests
Test the "wrong type of object" with Duration objects where appropriate, otherwise just use plain objects.
This commit is contained in:
parent
debd22a2ad
commit
9c6734f39b
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.duration.compare
|
esid: sec-temporal.duration.compare
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -31,8 +31,7 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
|
||||||
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
||||||
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
||||||
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.duration.prototype.round
|
esid: sec-temporal.duration.prototype.round
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -31,8 +31,7 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
|
||||||
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
||||||
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
||||||
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.duration.prototype.total
|
esid: sec-temporal.duration.prototype.total
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.instant.prototype.tostring
|
esid: sec-temporal.instant.prototype.tostring
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.instant.prototype.tozoneddatetimeiso
|
esid: sec-temporal.instant.prototype.tozoneddatetimeiso
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.now.plaindateiso
|
esid: sec-temporal.now.plaindateiso
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.now.plaindatetimeiso
|
esid: sec-temporal.now.plaindatetimeiso
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.now.plaintimeiso
|
esid: sec-temporal.now.plaintimeiso
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.now.zoneddatetimeiso
|
esid: sec-temporal.now.zoneddatetimeiso
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate
|
esid: sec-temporal.plaindate
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for Calendar
|
for Calendar
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate.compare
|
esid: sec-temporal.plaindate.compare
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate.from
|
esid: sec-temporal.plaindate.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate.prototype.equals
|
esid: sec-temporal.plaindate.prototype.equals
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate.prototype.tozoneddatetime
|
esid: sec-temporal.plaindate.prototype.tozoneddatetime
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindate.prototype.until
|
esid: sec-temporal.plaindate.prototype.until
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime
|
esid: sec-temporal.plaindatetime
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for Calendar
|
for Calendar
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime.compare
|
esid: sec-temporal.plaindatetime.compare
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime.from
|
esid: sec-temporal.plaindatetime.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime.prototype.equals
|
esid: sec-temporal.plaindatetime.prototype.equals
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime.prototype.tozoneddatetime
|
esid: sec-temporal.plaindatetime.prototype.tozoneddatetime
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plaindatetime.prototype.until
|
esid: sec-temporal.plaindatetime.prototype.until
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainmonthday
|
esid: sec-temporal.plainmonthday
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for Calendar
|
for Calendar
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainmonthday.from
|
esid: sec-temporal.plainmonthday.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainmonthday.prototype.equals
|
esid: sec-temporal.plainmonthday.prototype.equals
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainyearmonth
|
esid: sec-temporal.plainyearmonth
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for Calendar
|
for Calendar
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainyearmonth.compare
|
esid: sec-temporal.plainyearmonth.compare
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainyearmonth.from
|
esid: sec-temporal.plainyearmonth.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainyearmonth.prototype.equals
|
esid: sec-temporal.plainyearmonth.prototype.equals
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.plainyearmonth.prototype.until
|
esid: sec-temporal.plainyearmonth.prototype.until
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.zoneddatetime
|
esid: sec-temporal.zoneddatetime
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for Calendar
|
for Calendar
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -35,10 +35,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -35,8 +35,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.zoneddatetime.from
|
esid: sec-temporal.zoneddatetime.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when a calendar property from a property bag cannot
|
Appropriate error thrown when a calendar property from a property bag cannot
|
||||||
be converted to a calendar object or string
|
be converted to a calendar ID
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
esid: sec-temporal.zoneddatetime.from
|
esid: sec-temporal.zoneddatetime.from
|
||||||
description: >
|
description: >
|
||||||
Appropriate error thrown when argument cannot be converted to a valid string
|
Appropriate error thrown when argument cannot be converted to a valid string
|
||||||
or object for TimeZone
|
for time zone
|
||||||
features: [BigInt, Symbol, Temporal]
|
features: [BigInt, Symbol, Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [calendar, description] of typeErrorTests) {
|
for (const [calendar, description] of typeErrorTests) {
|
||||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "plain object that doesn't implement the protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [arg, description] of typeErrorTests) {
|
for (const [arg, description] of typeErrorTests) {
|
||||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||||||
|
|
||||||
const typeErrorTests = [
|
const typeErrorTests = [
|
||||||
[Symbol(), "symbol"],
|
[Symbol(), "symbol"],
|
||||||
[{}, "object not implementing time zone protocol"],
|
[{}, "object"],
|
||||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
[new Temporal.Duration(), "duration instance"],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const [timeZone, description] of typeErrorTests) {
|
for (const [timeZone, description] of typeErrorTests) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user