1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 16:17:47 +00:00

LibJS: Align ISO 8601 grammar with annotations from IXDTF

This is a normative change in the Temporal spec.

See: c64b844
This commit is contained in:
Luke Wilde 2022-11-02 18:26:46 +00:00 committed by Linus Groh
parent 0f2b4d0aac
commit 192aa75279
6 changed files with 245 additions and 93 deletions

View file

@ -31,11 +31,11 @@ describe("errors", () => {
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.ZonedDateTime");
});
test("from invalid calendar string", () => {
test("from invalid calendar identifier", () => {
const zonedDateTime = new Temporal.ZonedDateTime(1n, {}, {});
expect(() => {
zonedDateTime.withCalendar("iso8602foobar");
}).toThrowWithMessage(RangeError, "Invalid calendar string 'iso8602foobar'");
}).toThrowWithMessage(RangeError, "Invalid calendar identifier 'iso8602foobar'");
});
});