diff options
Diffstat (limited to 'js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js')
-rw-r--r-- | js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js b/js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js new file mode 100644 index 0000000000..4522df5ab2 --- /dev/null +++ b/js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js @@ -0,0 +1,14 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2023 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.tolocalestring +description: Offset time zones are not supported yet by Intl +features: [Temporal] +---*/ + +const datetime = new Temporal.ZonedDateTime(0n, "+00:00"); +assert.throws(RangeError, () => datetime.toLocaleString(), "Intl.DateTimeFormat does not yet specify what to do with offset time zones"); + +reportCompare(0, 0); |