mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibJS: Reject '-000000' as extended year
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/e60ef9e
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 19:53:02 +09:00
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user