Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainYearMonth / prototype / until / argument-propertybag-calendar-number.js
blobce758e146e793ef20d5e7a1e6920a6041bc6c878
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.plainyearmonth.prototype.until
7 description: A number as calendar in a property bag is not accepted
8 features: [Temporal]
9 ---*/
11 const instance = new Temporal.PlainYearMonth(2019, 6);
13 const numbers = [
14   1,
15   19970327,
16   -19970327,
17   1234567890,
20 for (const calendar of numbers) {
21   const arg = { year: 2019, monthCode: "M06", calendar };
22   assert.throws(
23     TypeError,
24     () => instance.until(arg),
25     "Numbers cannot be used as a calendar"
26   );
29 reportCompare(0, 0);