mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +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
|
@ -65,6 +65,12 @@ describe("errors", () => {
|
|||
);
|
||||
});
|
||||
|
||||
test("extended year must not be negative zero", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainTime.from("-000000-01-01T00:00:00");
|
||||
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
|
||||
});
|
||||
|
||||
test("ambiguous string must contain a time designator", () => {
|
||||
const values = [
|
||||
// YYYY-MM or HHMM-UU
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue