Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / Calendar / prototype / weekOfYear / argument-propertybag-calendar-year-zero.js
blob023b2ca730538d7ff4ae267de1b47616f5247c67
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.calendar.prototype.weekofyear
7 description: Negative zero, as an extended year, is rejected
8 features: [Temporal, arrow-function]
9 ---*/
11 const invalidStrings = [
12   "-000000-10-31",
13   "-000000-10-31T17:45",
14   "-000000-10-31T17:45Z",
15   "-000000-10-31T17:45+01:00",
16   "-000000-10-31T17:45+00:00[UTC]",
18 const instance = new Temporal.Calendar("iso8601");
19 invalidStrings.forEach((arg) => {
20   assert.throws(
21     RangeError,
22     () => instance.weekOfYear(arg),
23     "reject minus zero as extended year"
24   );
25 });
27 reportCompare(0, 0);