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.
6 esid: sec-temporal.zoneddatetime.prototype.equals
7 description: Property bag with offset property is rejected if offset is in the wrong format
11 const timeZone = "UTC";
12 const instance = new Temporal.ZonedDateTime(0n, timeZone);
15 "00:00", // missing sign
17 "-000:00", // too long
18 0, // must be a string
19 null, // must be a string
20 true, // must be a string
21 1000n, // must be a string
23 badOffsets.forEach((offset) => {
24 const arg = { year: 2021, month: 10, day: 28, offset, timeZone };
26 typeof(offset) === 'string' ? RangeError : TypeError,
27 () => instance.equals(arg),
28 `"${offset} is not a valid offset string`