mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:57:46 +00:00
LibJS: Implement parsing of TemporalCalendarString
This commit is contained in:
parent
1583c7257c
commit
79a18b058f
6 changed files with 33 additions and 9 deletions
|
@ -31,13 +31,11 @@ describe("errors", () => {
|
|||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.ZonedDateTime");
|
||||
});
|
||||
|
||||
// FIXME: Enable this when calendar string parsing is implemented.
|
||||
test.skip("from invalid calendar string", () => {
|
||||
test("from invalid calendar string", () => {
|
||||
const zonedDateTime = new Temporal.ZonedDateTime(1n, {}, {});
|
||||
|
||||
// FIXME: Use "toThrowWithMessage" once this has an error message.
|
||||
expect(() => {
|
||||
zonedDateTime.withCalendar("iso8602foobar");
|
||||
}).toThrow(RangeError);
|
||||
}).toThrowWithMessage(RangeError, "Invalid calendar string 'iso8602foobar'");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue