Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/getOwnPropertyNames.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-objects
7 description: Temporal has own property names
8 features: [Temporal]
9 ---*/
10
11 const keys = Object.getOwnPropertyNames(Temporal);
12
13 assert(keys.indexOf("Instant") > -1, "Instant");
14 assert(keys.indexOf("PlainDate") > -1, "PlainDate");
15 assert(keys.indexOf("PlainTime") > -1, "PlainTime");
16 assert(keys.indexOf("PlainDateTime") > -1, "PlainDateTime");
17 assert(keys.indexOf("ZonedDateTime") > -1, "ZonedDateTime");
18 assert(keys.indexOf("PlainYearMonth") > -1, "PlainYearMonth");
19 assert(keys.indexOf("PlainMonthDay") > -1, "PlainMonthDay");
20 assert(keys.indexOf("Duration") > -1, "Duration");
21 assert(keys.indexOf("Now") > -1, "Now");
22
23 reportCompare(0, 0);