builtin.js (1238B)
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.now 7 description: Tests that Temporal.Now meets the requirements for built-in objects 8 info: | 9 Unless specified otherwise, a built-in object that is callable as a function is a built-in 10 function object with the characteristics described in 10.3. Unless specified otherwise, the 11 [[Extensible]] internal slot of a built-in object initially has the value true. 12 13 Unless otherwise specified every built-in function and every built-in constructor has the 14 Function prototype object [...] as the value of its [[Prototype]] internal slot. 15 features: [Temporal] 16 ---*/ 17 18 assert.sameValue(Object.isExtensible(Temporal.Now), 19 true, "Built-in objects must be extensible."); 20 21 assert.sameValue(Object.prototype.toString.call(Temporal.Now), 22 "[object Temporal.Now]", "Object.prototype.toString"); 23 24 assert.sameValue(Object.getPrototypeOf(Temporal.Now), 25 Object.prototype, "prototype"); 26 27 assert.sameValue(Temporal.Now.prototype, 28 undefined, "prototype property"); 29 30 reportCompare(0, 0);