2022-01-25 11:21:17 +01:00
|
|
|
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
esid: sec-temporal.plainyearmonth.from
|
|
|
|
description: An invalid ISO string is never supported
|
2022-10-21 23:53:42 +02:00
|
|
|
includes: [temporalHelpers.js]
|
2022-01-25 11:21:17 +01:00
|
|
|
features: [Temporal]
|
|
|
|
---*/
|
|
|
|
|
2022-10-21 23:53:42 +02:00
|
|
|
for (const input of TemporalHelpers.ISO.plainYearMonthStringsInvalid()) {
|
|
|
|
assert.throws(RangeError, () => Temporal.PlainYearMonth.from(input, { overflow: "reject" }));
|
|
|
|
assert.throws(RangeError, () => Temporal.PlainYearMonth.from(input, { overflow: "constrain" }));
|
|
|
|
}
|