diff options
Diffstat (limited to 'js/src/tests/test262/intl402/Temporal/Now/zonedDateTimeISO/timezone-string.js')
-rw-r--r-- | js/src/tests/test262/intl402/Temporal/Now/zonedDateTimeISO/timezone-string.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/Temporal/Now/zonedDateTimeISO/timezone-string.js b/js/src/tests/test262/intl402/Temporal/Now/zonedDateTimeISO/timezone-string.js new file mode 100644 index 0000000000..85b7d58b03 --- /dev/null +++ b/js/src/tests/test262/intl402/Temporal/Now/zonedDateTimeISO/timezone-string.js @@ -0,0 +1,18 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2022 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.now.zoneddatetimeiso +description: String calendar argument +features: [Temporal] +---*/ + +const zdt = Temporal.Now.zonedDateTimeISO("America/Los_Angeles"); +assert(zdt instanceof Temporal.ZonedDateTime); +assert.sameValue(typeof zdt.getISOFields().calendar, "string", "calendar slot should store a string"); +assert.sameValue(zdt.calendarId, "iso8601"); +assert.sameValue(typeof zdt.getISOFields().timeZone, "string", "time zone slot should store a string"); +assert.sameValue(zdt.timeZoneId, "America/Los_Angeles"); + +reportCompare(0, 0); |