Skip to content

Commit bb4a21c

Browse files
committed
Minor updates to text in Temporal calendar-wrong-type tests
These were missed in tc39#4415
1 parent d2940bd commit bb4a21c

File tree

11 files changed

+26
-25
lines changed

11 files changed

+26
-25
lines changed

test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-wrong-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
esid: sec-temporal.plaindate.prototype.since
66
description: >
77
Appropriate error thrown when a calendar property from a property bag cannot
8-
be converted to a calendar object
8+
be converted to a calendar ID
99
features: [BigInt, Symbol, Temporal]
1010
---*/
1111

test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-wrong-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
esid: sec-temporal.plaindatetime.prototype.since
66
description: >
77
Appropriate error thrown when a calendar property from a property bag cannot
8-
be converted to a calendar object or string
8+
be converted to a calendar ID
99
features: [BigInt, Symbol, Temporal]
1010
---*/
1111

test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/calendar-wrong-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const instance = new Temporal.PlainDateTime(1976, 11, 18, 15, 23, 30, 123, 456,
1414
const wrongTypeTests = [
1515
[null, "null"],
1616
[true, "boolean"],
17-
[1, "number that doesn't convert to a valid ISO string"],
17+
[1, "number"],
1818
[1n, "bigint"],
1919
[19970327, "large number"],
2020
[-19970327, "negative number"],
@@ -28,6 +28,6 @@ for (const [arg, description] of wrongTypeTests) {
2828
assert.throws(
2929
TypeError,
3030
() => instance.withCalendar(arg),
31-
`${description} does not convert to a valid ISO string`
31+
`${description} is not a valid calendar`
3232
);
3333
}

test/built-ins/Temporal/PlainMonthDay/prototype/equals/argument-propertybag-calendar-wrong-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const instance = new Temporal.PlainMonthDay(5, 2);
1414
const wrongTypeTests = [
1515
[null, "null"],
1616
[true, "boolean"],
17-
[1, "number that doesn't convert to a valid ISO string"],
17+
[1, "number"],
1818
[1n, "bigint"],
1919
[19970327, "large number"],
2020
[-19970327, "negative number"],
@@ -29,6 +29,6 @@ for (const [calendar, description] of wrongTypeTests) {
2929
assert.throws(
3030
TypeError,
3131
() => instance.equals(arg),
32-
`${description} does not convert to a valid ISO string`
32+
`${description} is not a valid calendar`
3333
);
3434
}

test/built-ins/Temporal/PlainYearMonth/prototype/equals/argument-propertybag-calendar-wrong-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const instance = new Temporal.PlainYearMonth(2000, 5);
1414
const wrongTypeTests = [
1515
[null, "null"],
1616
[true, "boolean"],
17-
[1, "number that doesn't convert to a valid ISO string"],
17+
[1, "number"],
1818
[1n, "bigint"],
1919
[19970327, "large positive number"],
2020
[-19970327, "negative number"],
@@ -29,6 +29,6 @@ for (const [calendar, description] of wrongTypeTests) {
2929
assert.throws(
3030
TypeError,
3131
() => instance.equals(arg),
32-
`${description} does not convert to a valid ISO string`
32+
`${description} is not a valid calendar`
3333
);
3434
}

test/built-ins/Temporal/PlainYearMonth/prototype/since/argument-propertybag-calendar-wrong-type.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
esid: sec-temporal.plainyearmonth.prototype.since
66
description: >
77
Appropriate error thrown when a calendar property from a property bag cannot
8-
be converted to a calendar object or string
8+
be converted to a calendar ID
99
features: [BigInt, Symbol, Temporal]
1010
---*/
1111

@@ -14,7 +14,7 @@ const instance = new Temporal.PlainYearMonth(2000, 5);
1414
const wrongTypeTests = [
1515
[null, "null"],
1616
[true, "boolean"],
17-
[1, "number that doesn't convert to a valid ISO string"],
17+
[1, "number"],
1818
[1n, "bigint"],
1919
[19970327, "large positive number"],
2020
[-19970327, "negative number"],
@@ -29,6 +29,6 @@ for (const [calendar, description] of wrongTypeTests) {
2929
assert.throws(
3030
TypeError,
3131
() => instance.since(arg),
32-
`${description} does not convert to a valid ISO string`
32+
`${description} is not a valid calendar`
3333
);
3434
}

test/built-ins/Temporal/PlainYearMonth/prototype/until/argument-propertybag-calendar-wrong-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const instance = new Temporal.PlainYearMonth(2000, 5);
1414
const wrongTypeTests = [
1515
[null, "null"],
1616
[true, "boolean"],
17-
[1, "number that doesn't convert to a valid ISO string"],
17+
[1, "number"],
1818
[1n, "bigint"],
1919
[19970327, "large positive number"],
2020
[-19970327, "large negative number"],
@@ -29,6 +29,6 @@ for (const [calendar, description] of wrongTypeTests) {
2929
assert.throws(
3030
TypeError,
3131
() => instance.until(arg),
32-
`${description} does not convert to a valid ISO string`
32+
`${description} is not a valid calendar`
3333
);
3434
}

test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-calendar-wrong-type.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ features: [BigInt, Symbol, Temporal]
1212
const timeZone = "UTC";
1313
const instance = new Temporal.ZonedDateTime(0n, timeZone);
1414

15-
const primitiveTests = [
15+
const wrongTypeTests = [
1616
[null, "null"],
1717
[true, "boolean"],
18-
[1, "number that doesn't convert to a valid ISO string"],
18+
[1, "number"],
1919
[1n, "bigint"],
2020
[19970327, "large number"],
2121
[-19970327, "negative number"],
@@ -25,11 +25,11 @@ const primitiveTests = [
2525
[new Temporal.Duration(), "duration instance"],
2626
];
2727

28-
for (const [calendar, description] of primitiveTests) {
28+
for (const [calendar, description] of wrongTypeTests) {
2929
const arg = { year: 2019, monthCode: "M11", day: 1, calendar };
3030
assert.throws(
3131
TypeError,
3232
() => instance.equals(arg),
33-
`${description} does not convert to a valid ISO string`
33+
`${description} is not a valid calendar`
3434
);
3535
}

test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-calendar-wrong-type.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
esid: sec-temporal.zoneddatetime.prototype.since
66
description: >
77
Appropriate error thrown when a calendar property from a property bag cannot
8-
be converted to a calendar object or string
8+
be converted to a calendar ID
99
features: [BigInt, Symbol, Temporal]
1010
---*/
1111

@@ -15,7 +15,7 @@ const instance = new Temporal.ZonedDateTime(0n, timeZone);
1515
const wrongTypeTests = [
1616
[null, "null"],
1717
[true, "boolean"],
18-
[1, "number that doesn't convert to a valid ISO string"],
18+
[1, "number"],
1919
[1n, "bigint"],
2020
[19970327, "large number"],
2121
[-19970327, "negative number"],
@@ -30,6 +30,6 @@ for (const [calendar, description] of wrongTypeTests) {
3030
assert.throws(
3131
TypeError,
3232
() => instance.since(arg),
33-
`${description} does not convert to a valid ISO string`
33+
`${description} is not a valid calendar`
3434
);
3535
}

test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-calendar-wrong-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const instance = new Temporal.ZonedDateTime(0n, timeZone);
1515
const wrongTypeTests = [
1616
[null, "null"],
1717
[true, "boolean"],
18-
[1, "number that doesn't convert to a valid ISO string"],
18+
[1, "number"],
1919
[1n, "bigint"],
2020
[19970327, "large number"],
2121
[-19970327, "negative number"],
@@ -30,6 +30,6 @@ for (const [calendar, description] of wrongTypeTests) {
3030
assert.throws(
3131
TypeError,
3232
() => instance.until(arg),
33-
`${description} does not convert to a valid ISO string`
33+
`${description} is not a valid calendar`
3434
);
3535
}

0 commit comments

Comments
 (0)