Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / equals / argument-string-with-utc-designator.js
blob87c198701d689a54fed09ae3e6d106d9e7faf7ac
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.plainmonthday.prototype.equals
7 description: RangeError thrown if a string with UTC designator is used as a PlainMonthDay
8 features: [Temporal, arrow-function]
9 ---*/
11 const invalidStrings = [
12   "2019-10-01T09:00:00Z",
13   "2019-10-01T09:00:00Z[UTC]",
15 const instance = new Temporal.PlainMonthDay(5, 2);
16 invalidStrings.forEach((arg) => {
17   assert.throws(
18     RangeError,
19     () => instance.equals(arg),
20     "String with UTC designator should not be valid as a PlainMonthDay"
21   );
22 });
24 reportCompare(0, 0);