subclassing-ignored.js (1194B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2021 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: The receiver is never called when calling from() 8 includes: [temporalHelpers.js] 9 features: [Temporal] 10 ---*/ 11 12 TemporalHelpers.checkSubclassingIgnoredStatic( 13 Temporal.ZonedDateTime, 14 "from", 15 ["2000-01-01T00:00:00.00000001+00:00[UTC]"], 16 (result) => { 17 assert.sameValue(result.epochNanoseconds, 946684800_000_000_010n, "epochNanoseconds result"); 18 assert.sameValue(result.year, 2000, "year result"); 19 assert.sameValue(result.month, 1, "month result"); 20 assert.sameValue(result.day, 1, "day result"); 21 assert.sameValue(result.hour, 0, "hour result"); 22 assert.sameValue(result.minute, 0, "minute result"); 23 assert.sameValue(result.second, 0, "second result"); 24 assert.sameValue(result.millisecond, 0, "millisecond result"); 25 assert.sameValue(result.microsecond, 0, "microsecond result"); 26 assert.sameValue(result.nanosecond, 10, "nanosecond result"); 27 }, 28 ); 29 30 reportCompare(0, 0);