Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / equals / argument-string-multiple-time-zone.js
blob23be2363484cc05d22517b2ac7bdda94ee51d0eb
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.plainmonthday.prototype.equals
7 description: More than one time zone annotation is not syntactical
8 features: [Temporal]
9 ---*/
11 const invalidStrings = [
12   "1970-01-01T00:00[UTC][UTC]",
13   "1970-01-01T00:00[!UTC][UTC]",
14   "1970-01-01T00:00[UTC][!UTC]",
15   "1970-01-01T00:00[UTC][u-ca=iso8601][UTC]",
16   "1970-01-01T00:00[UTC][foo=bar][UTC]",
18 const instance = new Temporal.PlainMonthDay(5, 2);
19 invalidStrings.forEach((arg) => {
20   assert.throws(
21     RangeError,
22     () => instance.equals(arg),
23     `reject more than one time zone annotation: ${arg}`
24   );
25 });
27 reportCompare(0, 0);