Bug 1904139 - Don't re-initialize platform font list from GetDefaultFont. r=jfkthame
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / ZonedDateTime / prototype / equals / year-zero.js
blobcae89644b163409b9786956c61af80dc758a22cb
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-temporal.zoneddatetime.prototype.equals
7 description: Negative zero, as an extended year, is rejected
8 features: [Temporal, arrow-function]
9 ---*/
11 const invalidStrings = [
12   "-0000000-01-01T00:02Z[UTC]",
13   "-0000000-01-01T00:02+00:00[UTC]",
14   "-0000000-01-01T00:02:00.000000000+00:00[UTC]",
16 const timeZone = new Temporal.TimeZone("UTC");
17 const instance = new Temporal.ZonedDateTime(0n, timeZone);
18 invalidStrings.forEach((arg) => {
19   assert.throws(
20     RangeError,
21     () => instance.equals(arg),
22     "reject minus zero as extended year"
23   );
24 });
26 reportCompare(0, 0);