Bug 1905259 - Add updated thumbs up and down icons, add CSS animation to active state...
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / toPlainDate / builtin-calendar-no-array-iteration.js
blobe9657f74afe2272dc4f69c1feae5742a584fc1e4
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2023 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.toplaindate
7 description: >
8   Calling the method on an instance constructed with a builtin calendar causes
9   no observable array iteration when getting the calendar fields.
10 features: [Temporal]
11 ---*/
13 const arrayPrototypeSymbolIteratorOriginal = Array.prototype[Symbol.iterator];
14 Array.prototype[Symbol.iterator] = function arrayIterator() {
15   throw new Test262Error("Array should not be iterated");
18 const instance = new Temporal.PlainMonthDay(5, 1, "iso8601");
19 instance.toPlainDate({ year: 2005 });
21 Array.prototype[Symbol.iterator] = arrayPrototypeSymbolIteratorOriginal;
23 reportCompare(0, 0);