mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:57:35 +00:00
LibJS: Adjust grammar for DateExtendedYear to exclude -000000
This is an editorial change in the Temporal spec.
See: fb3e656
We lose the custom error message, but it's not the end of the world.
This commit is contained in:
parent
68af8649fb
commit
54af3a5396
8 changed files with 28 additions and 30 deletions
|
@ -105,9 +105,9 @@ describe("errors", () => {
|
|||
test("extended year must not be negative zero", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainYearMonth.from("-000000-01");
|
||||
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
|
||||
}).toThrowWithMessage(RangeError, "Invalid year month string '-000000-01'");
|
||||
expect(() => {
|
||||
Temporal.PlainYearMonth.from("−000000-01-01"); // U+2212
|
||||
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
|
||||
Temporal.PlainYearMonth.from("−000000-01"); // U+2212
|
||||
}).toThrowWithMessage(RangeError, "Invalid year month string '−000000-01'");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue