mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 00:57:44 +00:00
LibJS: Reject '-000000' as extended year
This is a normative change in the Temporal spec.
See: e60ef9e
This commit is contained in:
parent
8215b99df1
commit
19a2b32065
7 changed files with 60 additions and 17 deletions
|
@ -49,4 +49,10 @@ describe("errors", () => {
|
|||
Temporal.PlainDate.from("foo");
|
||||
}).toThrowWithMessage(RangeError, "Invalid date string 'foo'");
|
||||
});
|
||||
|
||||
test("extended year must not be negative zero", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDate.from("-000000-01-01");
|
||||
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue