diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js b/js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js new file mode 100644 index 0000000000..8c9ae4c2a9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js @@ -0,0 +1,17 @@ +// |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.plaindate.from +description: Property bag is correctly converted into PlainDate +includes: [temporalHelpers.js] +features: [Temporal] +---*/ + +const calendar = new Temporal.Calendar("iso8601"); +const plainDate = Temporal.PlainDate.from({ year: 1976, month: 11, day: 18, calendar }); +TemporalHelpers.assertPlainDate(plainDate, 1976, 11, "M11", 18); +assert.sameValue(plainDate.getISOFields().calendar, "iso8601", "calendar slot should store a string"); + +reportCompare(0, 0); |