Debian Codegraph @

js/src/tests/test262/intl402/Temporal/ZonedDateTime/supported-values-of.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2022 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.zoneddatetime
7 description: >
8 ZonedDateTime constructor accepts all time zone identifiers from
9 Intl.supportedValuesOf.
10 features: [Temporal, Intl-enumeration]
11 ---*/
12
13 // Ensure all identifiers are valid and canonical.
14 for (let id of Intl.supportedValuesOf("timeZone")) {
15 let instance = new Temporal.ZonedDateTime(0n, id);
16
17 assert.sameValue(instance.timeZoneId, id);
18 }
19
20 reportCompare(0, 0);