Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / equals / argument-string-calendar-annotation.js
blob5378f5e7d5ca21771c4a697fc5775b192f5f12fe
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: Various forms of calendar annotation; critical flag has no effect
8 features: [Temporal]
9 ---*/
11 const tests = [
12   ["1976-05-02T15:23[u-ca=iso8601]", "without time zone"],
13   ["1976-05-02T15:23[UTC][u-ca=iso8601]", "with time zone"],
14   ["1976-05-02T15:23[!u-ca=iso8601]", "with ! and no time zone"],
15   ["1976-05-02T15:23[UTC][!u-ca=iso8601]", "with ! and time zone"],
16   ["1976-05-02T15:23[u-ca=iso8601][u-ca=discord]", "second annotation ignored"],
19 const instance = new Temporal.PlainMonthDay(5, 2);
21 tests.forEach(([arg, description]) => {
22   const result = instance.equals(arg);
24   assert.sameValue(
25     result,
26     true,
27     `calendar annotation (${description})`
28   );
29 });
31 reportCompare(0, 0);