From 104e5e8fab806c3a75fe6913f626cf13943698ca Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 11 Mar 2022 09:51:57 +0100 Subject: [PATCH] Test more invalid values for roundingMode. --- .../Duration/prototype/round/roundingmode-invalid-string.js | 4 +++- .../prototype/toString/roundingmode-invalid-string.js | 2 +- .../Instant/prototype/round/roundingmode-invalid-string.js | 4 +++- .../Instant/prototype/since/roundingmode-invalid-string.js | 4 +++- .../Instant/prototype/toString/roundingmode-invalid-string.js | 4 +++- .../Instant/prototype/until/roundingmode-invalid-string.js | 4 +++- .../PlainDate/prototype/since/roundingmode-invalid-string.js | 4 +++- .../PlainDate/prototype/until/roundingmode-invalid-string.js | 4 +++- .../prototype/round/roundingmode-invalid-string.js | 4 +++- .../prototype/since/roundingmode-invalid-string.js | 4 +++- .../prototype/toString/roundingmode-invalid-string.js | 4 +++- .../prototype/until/roundingmode-invalid-string.js | 4 +++- .../PlainTime/prototype/round/roundingmode-invalid-string.js | 2 +- .../PlainTime/prototype/since/roundingmode-invalid-string.js | 3 +-- .../prototype/toString/roundingmode-invalid-string.js | 2 +- .../PlainTime/prototype/until/roundingmode-invalid-string.js | 3 +-- .../prototype/since/roundingmode-invalid-string.js | 4 +++- .../prototype/until/roundingmode-invalid-string.js | 4 +++- .../prototype/round/roundingmode-invalid-string.js | 4 +++- .../prototype/since/roundingmode-invalid-string.js | 4 +++- .../prototype/toString/roundingmode-invalid-string.js | 4 +++- .../prototype/until/roundingmode-invalid-string.js | 4 +++- 22 files changed, 56 insertions(+), 24 deletions(-) diff --git a/test/built-ins/Temporal/Duration/prototype/round/roundingmode-invalid-string.js b/test/built-ins/Temporal/Duration/prototype/round/roundingmode-invalid-string.js index 35a9df2807..e895dd70f0 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Duration/prototype/round/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const duration = new Temporal.Duration(0, 0, 0, 0, 12, 34, 56, 123, 987, 500); -assert.throws(RangeError, () => duration.round({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => duration.round({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/Duration/prototype/toString/roundingmode-invalid-string.js b/test/built-ins/Temporal/Duration/prototype/toString/roundingmode-invalid-string.js index efc9ba2b71..f1015122ce 100644 --- a/test/built-ins/Temporal/Duration/prototype/toString/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Duration/prototype/toString/roundingmode-invalid-string.js @@ -8,6 +8,6 @@ features: [Temporal] ---*/ const duration = new Temporal.Duration(0, 0, 0, 0, 12, 34, 56, 123, 987, 500); -for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto"]) { +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { assert.throws(RangeError, () => duration.toString({ smallestUnit: "microsecond", roundingMode })); } diff --git a/test/built-ins/Temporal/Instant/prototype/round/roundingmode-invalid-string.js b/test/built-ins/Temporal/Instant/prototype/round/roundingmode-invalid-string.js index 7f3ed29f4a..a826b1e72e 100644 --- a/test/built-ins/Temporal/Instant/prototype/round/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Instant/prototype/round/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const instant = new Temporal.Instant(1_000_000_000_123_987_500n); -assert.throws(RangeError, () => instant.round({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => instant.round({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/Instant/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/Instant/prototype/since/roundingmode-invalid-string.js index 66f94cf2ca..27771f28e8 100644 --- a/test/built-ins/Temporal/Instant/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Instant/prototype/since/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.Instant(1_000_000_000_000_000_000n); const later = new Temporal.Instant(1_000_090_061_123_987_500n); -assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/Instant/prototype/toString/roundingmode-invalid-string.js b/test/built-ins/Temporal/Instant/prototype/toString/roundingmode-invalid-string.js index 4a4099b108..6bff72f3b3 100644 --- a/test/built-ins/Temporal/Instant/prototype/toString/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Instant/prototype/toString/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const instant = new Temporal.Instant(1_000_000_000_123_987_500n); -assert.throws(RangeError, () => instant.toString({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => instant.toString({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/Instant/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/Instant/prototype/until/roundingmode-invalid-string.js index fc8aaed464..82a212cafd 100644 --- a/test/built-ins/Temporal/Instant/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/Instant/prototype/until/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.Instant(1_000_000_000_000_000_000n); const later = new Temporal.Instant(1_000_090_061_123_987_500n); -assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js index cf9d9e20c7..8aeeb56734 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainDate(2000, 5, 2); const later = new Temporal.PlainDate(2001, 6, 3); -assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js index 2ed4da16bb..9139e8c151 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainDate(2000, 5, 2); const later = new Temporal.PlainDate(2001, 6, 3); -assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-invalid-string.js index 00a3140c53..1a231aad4c 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const datetime = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 123, 987, 500); -assert.throws(RangeError, () => datetime.round({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => datetime.round({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-invalid-string.js index 59b1314d56..52f4b8fe3b 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 0, 0, 0); const later = new Temporal.PlainDateTime(2000, 5, 3, 13, 35, 57, 123, 987, 500); -assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toString/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDateTime/prototype/toString/roundingmode-invalid-string.js index 3a3c9af8e8..bc2e1e2c4a 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/toString/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toString/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const datetime = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 123, 987, 500); -assert.throws(RangeError, () => datetime.toString({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => datetime.toString({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-invalid-string.js index f907ababfd..47455e7a19 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 0, 0, 0); const later = new Temporal.PlainDateTime(2000, 5, 3, 13, 35, 57, 123, 987, 500); -assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-invalid-string.js index 200c100d2e..ba3fa48a7e 100644 --- a/test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-invalid-string.js @@ -8,6 +8,6 @@ features: [Temporal] ---*/ const time = new Temporal.PlainTime(12, 34, 56, 123, 987, 500); -for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l"]) { +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { assert.throws(RangeError, () => time.round({ smallestUnit: "microsecond", roundingMode })); } diff --git a/test/built-ins/Temporal/PlainTime/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainTime/prototype/since/roundingmode-invalid-string.js index 6dc1b1ab6e..623d946371 100644 --- a/test/built-ins/Temporal/PlainTime/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainTime/prototype/since/roundingmode-invalid-string.js @@ -9,7 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainTime(12, 34, 56, 0, 0, 0); const later = new Temporal.PlainTime(13, 35, 57, 123, 987, 500); - -for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto"]) { +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); } diff --git a/test/built-ins/Temporal/PlainTime/prototype/toString/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainTime/prototype/toString/roundingmode-invalid-string.js index 529541f2ad..c66d624740 100644 --- a/test/built-ins/Temporal/PlainTime/prototype/toString/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainTime/prototype/toString/roundingmode-invalid-string.js @@ -8,6 +8,6 @@ features: [Temporal] ---*/ const time = new Temporal.PlainTime(12, 34, 56, 123, 987, 500); -for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l"]) { +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { assert.throws(RangeError, () => time.toString({ smallestUnit: "microsecond", roundingMode })); } diff --git a/test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-invalid-string.js index e9fbe3b9c0..1b2aa526d1 100644 --- a/test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-invalid-string.js @@ -9,7 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainTime(12, 34, 56, 0, 0, 0); const later = new Temporal.PlainTime(13, 35, 57, 123, 987, 500); - -for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto"]) { +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); } diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-invalid-string.js index 14cbe1ac2f..ae3e9de8e3 100644 --- a/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainYearMonth(2000, 5); const later = new Temporal.PlainYearMonth(2001, 6); -assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-invalid-string.js index 3e6231aef4..d5f8d9884f 100644 --- a/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.PlainYearMonth(2000, 5); const later = new Temporal.PlainYearMonth(2001, 6); -assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/round/roundingmode-invalid-string.js b/test/built-ins/Temporal/ZonedDateTime/prototype/round/roundingmode-invalid-string.js index 145e3f615a..b5b58bc40d 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/round/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/round/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const datetime = new Temporal.ZonedDateTime(1_000_000_000_123_987_500n, "UTC"); -assert.throws(RangeError, () => datetime.round({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => datetime.round({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/roundingmode-invalid-string.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/roundingmode-invalid-string.js index 8fd11a6ba5..c749232dcd 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/since/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC"); const later = new Temporal.ZonedDateTime(1_000_090_061_123_987_500n, "UTC"); -assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => later.since(earlier, { smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toString/roundingmode-invalid-string.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toString/roundingmode-invalid-string.js index 01d86acc41..50b223237c 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/toString/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toString/roundingmode-invalid-string.js @@ -8,4 +8,6 @@ features: [Temporal] ---*/ const datetime = new Temporal.ZonedDateTime(1_000_000_000_123_987_500n, "UTC"); -assert.throws(RangeError, () => datetime.toString({ smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => datetime.toString({ smallestUnit: "microsecond", roundingMode })); +} diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/roundingmode-invalid-string.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/roundingmode-invalid-string.js index 70d9827659..3cedb0046d 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/until/roundingmode-invalid-string.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/roundingmode-invalid-string.js @@ -9,4 +9,6 @@ features: [Temporal] const earlier = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC"); const later = new Temporal.ZonedDateTime(1_000_090_061_123_987_500n, "UTC"); -assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode: "other string" })); +for (const roundingMode of ["other string", "cile", "CEIL", "ce\u0131l", "auto", "expand", "halfCeil", "halfFloor", "halfTrunc", "halfEven", "halfexpand", "floor\0"]) { + assert.throws(RangeError, () => earlier.until(later, { smallestUnit: "microsecond", roundingMode })); +}