diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/Calendar/from/calendar-string-builtin.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Temporal/Calendar/from/calendar-string-builtin.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/Calendar/from/calendar-string-builtin.js b/js/src/tests/test262/built-ins/Temporal/Calendar/from/calendar-string-builtin.js new file mode 100644 index 0000000000..5fca567d39 --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/Calendar/from/calendar-string-builtin.js @@ -0,0 +1,22 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.from +description: Calendar.from should support iso8601. +features: [Temporal] +---*/ + +const tests = [ + "iso8601", + "1994-11-05T08:15:30-05:00", +]; + +for (const item of tests) { + const calendar = Temporal.Calendar.from(item); + assert(calendar instanceof Temporal.Calendar); + assert.sameValue(calendar.id, "iso8601"); +} + +reportCompare(0, 0); |