mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +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
|
@ -186,4 +186,10 @@ describe("errors", () => {
|
|||
"Invalid date time string '2021-07-06T23:42:01Z': must not contain a UTC designator"
|
||||
);
|
||||
});
|
||||
|
||||
test("extended year must not be negative zero", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDateTime.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