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 / argument-propertybag-timezone-getoffsetnanosecondsfor-out-of-range.js
bloba8e6622c8b459028f79d683825a7b629e642f6b6
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.
5 /*---
6 esid: sec-temporal.zoneddatetime.prototype.equals
7 description: RangeError thrown if time zone reports an offset that is out of range
8 features: [Temporal]
9 includes: [temporalHelpers.js]
10 ---*/
12 [-86400_000_000_000, 86400_000_000_000].forEach((wrongOffset) => {
13   const timeZone = TemporalHelpers.specificOffsetTimeZone(wrongOffset);
14   const datetime = new Temporal.ZonedDateTime(1_000_000_000_987_654_321n, "UTC");
15   timeZone.getPossibleInstantsFor = function () {
16     return [];
17   };
18   assert.throws(RangeError, () => datetime.equals({ year: 2000, month: 5, day: 2, hour: 12, timeZone }));
19 });
21 reportCompare(0, 0);