summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/getOwnPropertyNames.js
blob: 6f02865526ccb4644e2b742ac98bc6b37c1a16f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal-objects
description: Temporal has own property names
features: [Temporal]
---*/

const keys = Object.getOwnPropertyNames(Temporal);

assert(keys.indexOf("Instant") > -1, "Instant");
assert(keys.indexOf("TimeZone") > -1, "TimeZone");
assert(keys.indexOf("PlainDate") > -1, "PlainDate");
assert(keys.indexOf("PlainTime") > -1, "PlainTime");
assert(keys.indexOf("PlainDateTime") > -1, "PlainDateTime");
assert(keys.indexOf("ZonedDateTime") > -1, "ZonedDateTime");
assert(keys.indexOf("PlainYearMonth") > -1, "PlainYearMonth");
assert(keys.indexOf("PlainMonthDay") > -1, "PlainMonthDay");
assert(keys.indexOf("Duration") > -1, "Duration");
assert(keys.indexOf("Calendar") > -1, "Calendar");
assert(keys.indexOf("Now") > -1, "Now");

reportCompare(0, 0);