1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:37:44 +00:00

LibJS/Tests: Add tests for '−000000' (U+2212) DateExtendedYear

I noticed we only have coverage for this with the ASCII minus sign in
our own test suite.
This commit is contained in:
Linus Groh 2022-03-09 22:06:19 +01:00
parent aabb1c85ed
commit 2434d34644
5 changed files with 15 additions and 0 deletions

View file

@ -69,6 +69,9 @@ describe("errors", () => {
expect(() => {
Temporal.PlainTime.from("-000000-01-01T00:00:00");
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
expect(() => {
Temporal.PlainTime.from("000000-01-01T00:00:00"); // U+2212
}).toThrowWithMessage(RangeError, "Invalid extended year, must not be negative zero");
});
test("ambiguous string must contain a time designator", () => {