Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainDateTime/builtin.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) 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.plaindatetime
7 description: Tests that Temporal.PlainDateTime 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.PlainDateTime),
19 true, "Built-in objects must be extensible.");
20
21 assert.sameValue(Object.prototype.toString.call(Temporal.PlainDateTime),
22 "[object Function]", "Object.prototype.toString");
23
24 assert.sameValue(Object.getPrototypeOf(Temporal.PlainDateTime),
25 Function.prototype, "prototype");
26
27 assert.sameValue(typeof Temporal.PlainDateTime.prototype,
28 "object", "prototype property");
29
30 reportCompare(0, 0);