mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
LibJS: Check PlainMonthDay is in the ISO date time limits in creation
This is a normative change in the Temporal spec.
See: 374305c
This commit is contained in:
parent
61847b3cef
commit
1e829c4ea8
2 changed files with 17 additions and 7 deletions
|
@ -37,6 +37,12 @@ describe("errors", () => {
|
|||
new Temporal.PlainMonthDay(1, 0);
|
||||
}).toThrowWithMessage(RangeError, "Invalid plain month day");
|
||||
});
|
||||
|
||||
test("not within iso date time limit", () => {
|
||||
expect(() => {
|
||||
new Temporal.PlainMonthDay(9, 30, "iso8601", 999_999_999_999_999);
|
||||
}).toThrowWithMessage(RangeError, "Invalid plain month day");
|
||||
});
|
||||
});
|
||||
|
||||
describe("normal behavior", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue