1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibJS: Remove redundant TemporalDateString production

This is an editorial change in the Temporal spec.

See: 41a8a5c
This commit is contained in:
Linus Groh 2022-05-16 20:25:31 +01:00
parent 33f53041e7
commit 51e01b5a80
5 changed files with 8 additions and 38 deletions

View file

@ -44,18 +44,18 @@ describe("errors", () => {
}).toThrowWithMessage(TypeError, "null is not a function");
});
test("invalid date string", () => {
test("invalid date time string", () => {
expect(() => {
Temporal.PlainDate.from("foo");
}).toThrowWithMessage(RangeError, "Invalid date string 'foo'");
}).toThrowWithMessage(RangeError, "Invalid date time string 'foo'");
});
test("extended year must not be negative zero", () => {
expect(() => {
Temporal.PlainDate.from("-000000-01-01");
}).toThrowWithMessage(RangeError, "Invalid date string '-000000-01-01'");
}).toThrowWithMessage(RangeError, "Invalid date time string '-000000-01-01'");
expect(() => {
Temporal.PlainDate.from("000000-01-01"); // U+2212
}).toThrowWithMessage(RangeError, "Invalid date string '000000-01-01'");
}).toThrowWithMessage(RangeError, "Invalid date time string '000000-01-01'");
});
});