Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainTime/from/observable-get-overflow-argument-string-invalid.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.plaintime.from
7 description: overflow property is not extracted with ISO-invalid string argument.
8 includes: [compareArray.js, temporalHelpers.js]
9 features: [Temporal]
10 ---*/
11
12 let actual = [];
13 const object = {
14 get overflow() {
15 actual.push("get overflow");
16 return TemporalHelpers.toPrimitiveObserver(actual, "constrain", "overflow");
17 }
18 };
19
20 assert.throws(RangeError, () => Temporal.PlainTime.from("24:60", object));
21 assert.compareArray(actual, [], "options read after ISO string parsing");
22
23 reportCompare(0, 0);