Backed out changeset 8c746156d7c5 (bug 1908317) as requested by developer CLOSED...
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / ZonedDateTime / prototype / equals / argument-string-unknown-annotation.js
blob0c1641db13504ffb355e21e3685096d4ad1a00ea
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.zoneddatetime.prototype.equals
7 description: Various forms of unknown annotation
8 features: [Temporal]
9 ---*/
11 const tests = [
12   ["1970-01-01T00:00[UTC][foo=bar]", "with time zone"],
13   ["1970-01-01T00:00[UTC][foo=bar][u-ca=iso8601]", "before calendar"],
14   ["1970-01-01T00:00[UTC][u-ca=iso8601][foo=bar]", "after calendar"],
15   ["1970-01-01T00:00[UTC][foo=bar][_foo-bar0=Ignore-This-999999999999]", "with another unknown annotation"],
18 const instance = new Temporal.ZonedDateTime(0n, "UTC");
20 tests.forEach(([arg, description]) => {
21   const result = instance.equals(arg);
23   assert.sameValue(
24     result,
25     true,
26     `unknown annotation (${description})`
27   );
28 });
30 reportCompare(0, 0);