Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-function-object.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 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.zoneddatetime.from
7 description: Options may be a function object.
8 includes: [temporalHelpers.js]
9 features: [Temporal]
10 ---*/
11
12 // "1976-11-18T00:00:00+01:00[+01:00]"
13 const expected = new Temporal.ZonedDateTime(217119600000000000n, "+01:00");
14
15 TemporalHelpers.assertZonedDateTimesEqual( Temporal.ZonedDateTime.from({
16 year: 1976,
17 month: 11,
18 day: 18,
19 timeZone: "+01:00"
20 }, () => {
21 }), expected);
22
23 reportCompare(0, 0);