Skip to content

Commit b113ad6

Browse files
ptomatoMs2ger
authored andcommitted
Minor updates to text in Temporal calendar-wrong-type tests
These were missed in tc39#4415
1 parent 85ae4c0 commit b113ad6

File tree

14 files changed

+30
-29
lines changed

14 files changed

+30
-29
lines changed

test/built-ins/Temporal/Duration/prototype/round/relativeto-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.Duration(1, 0, 0, 0, 24);
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"],
@@ -32,6 +32,6 @@ for (const [calendar, description] of wrongTypeTests) {
3232
assert.throws(
3333
TypeError,
3434
() => instance.round({ largestUnit: "years", relativeTo }),
35-
`${description} does not convert to a valid ISO string`
35+
`${description} is not a valid calendar`
3636
);
3737
}

test/built-ins/Temporal/Duration/prototype/round/relativeto-wrong-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const primitiveTests = [
1717
[null, 'null'],
1818
[true, 'boolean'],
1919
['', 'empty string'],
20-
[1, "number that doesn't convert to a valid ISO string"],
20+
[1, 'number'],
2121
[1n, 'bigint']
2222
];
2323

test/built-ins/Temporal/Duration/prototype/total/relativeto-wrong-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const primitiveTests = [
1717
[null, 'null'],
1818
[true, 'boolean'],
1919
['', 'empty string'],
20-
[1, "number that doesn't convert to a valid ISO string"],
20+
[1, 'number'],
2121
[1n, 'bigint']
2222
];
2323

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
}

0 commit comments

Comments
 (0)