mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
LibJS: Throw on conversion from TimeZone to Calendar and vice versa
This is a normative change in the Temporal spec.
See: 2084e77
This commit is contained in:
parent
ca038c1a4e
commit
b0e7d59b8b
5 changed files with 60 additions and 10 deletions
|
@ -64,3 +64,15 @@ describe("normal behavior", () => {
|
|||
expect(madeObservableHasPropertyLookup).toBeFalse();
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("TimeZone from Calendar", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
expect(() => {
|
||||
Temporal.TimeZone.from(calendar);
|
||||
}).toThrowWithMessage(
|
||||
RangeError,
|
||||
"Got unexpected Calendar object in conversion to TimeZone"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue