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

LibJS: Fix parse ErrorType used in parse_temporal_date_string()

TemporalInvalidDateString, not TemporalInvalidDateTimeString.
This commit is contained in:
Linus Groh 2021-11-24 08:38:50 +00:00
parent b6f49924be
commit 836ce8ee5d
2 changed files with 7 additions and 1 deletions

View file

@ -43,4 +43,10 @@ describe("errors", () => {
Temporal.PlainDate.from(zonedDateTime);
}).toThrowWithMessage(TypeError, "null is not a function");
});
test("invalid date string", () => {
expect(() => {
Temporal.PlainDate.from("foo");
}).toThrowWithMessage(RangeError, "Invalid date string 'foo'");
});
});