mirror of https://github.com/tc39/test262.git
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
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -31,8 +31,7 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[{}, "object"],
|
||||
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
||||
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
||||
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.duration.prototype.round
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -31,8 +31,7 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[{}, "object"],
|
||||
[Temporal.PlainDate, "Temporal.PlainDate, object"],
|
||||
[Temporal.PlainDate.prototype, "Temporal.PlainDate.prototype, object"],
|
||||
[Temporal.ZonedDateTime, "Temporal.ZonedDateTime, object"],
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.duration.prototype.total
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.instant.prototype.tostring
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.instant.prototype.tozoneddatetimeiso
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.now.plaindateiso
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.now.plaindatetimeiso
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.now.plaintimeiso
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.now.zoneddatetimeiso
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for Calendar
|
||||
for Calendar
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate.compare
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate.from
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate.prototype.equals
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate.prototype.tozoneddatetime
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindate.prototype.until
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for Calendar
|
||||
for Calendar
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime.compare
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime.from
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime.prototype.equals
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime.prototype.tozoneddatetime
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plaindatetime.prototype.until
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainmonthday
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for Calendar
|
||||
for Calendar
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainmonthday.from
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainmonthday.prototype.equals
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainyearmonth
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for Calendar
|
||||
for Calendar
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainyearmonth.compare
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -33,10 +33,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainyearmonth.from
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainyearmonth.prototype.equals
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,10 +30,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.plainyearmonth.prototype.until
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.zoneddatetime
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for Calendar
|
||||
for Calendar
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -27,9 +27,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -35,10 +35,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -35,8 +35,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.zoneddatetime.from
|
||||
description: >
|
||||
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]
|
||||
---*/
|
||||
|
||||
|
@ -28,10 +28,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.zoneddatetime.from
|
||||
description: >
|
||||
Appropriate error thrown when argument cannot be converted to a valid string
|
||||
or object for TimeZone
|
||||
for time zone
|
||||
features: [BigInt, Symbol, Temporal]
|
||||
---*/
|
||||
|
||||
|
@ -28,8 +28,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -31,10 +31,8 @@ for (const [calendar, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[Temporal.Calendar.prototype, "Temporal.Calendar.prototype, object"], // fails brand check in dateFromFields()
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [calendar, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
|
@ -51,9 +51,8 @@ for (const [arg, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "plain object that doesn't implement the protocol"],
|
||||
[new Temporal.TimeZone("UTC"), "time zone instance"],
|
||||
[Temporal.Calendar, "Temporal.Calendar, object"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [arg, description] of typeErrorTests) {
|
||||
|
|
|
@ -30,8 +30,8 @@ for (const [timeZone, description] of primitiveTests) {
|
|||
|
||||
const typeErrorTests = [
|
||||
[Symbol(), "symbol"],
|
||||
[{}, "object not implementing time zone protocol"],
|
||||
[new Temporal.Calendar("iso8601"), "calendar instance"],
|
||||
[{}, "object"],
|
||||
[new Temporal.Duration(), "duration instance"],
|
||||
];
|
||||
|
||||
for (const [timeZone, description] of typeErrorTests) {
|
||||
|
|
Loading…
Reference in New Issue