mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17: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
|
@ -43,3 +43,15 @@ describe("normal behavior", () => {
|
|||
expect(madeObservableHasPropertyLookup).toBeFalse();
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("Calendar from TimeZone", () => {
|
||||
const timeZone = new Temporal.TimeZone("UTC");
|
||||
expect(() => {
|
||||
Temporal.Calendar.from(timeZone);
|
||||
}).toThrowWithMessage(
|
||||
RangeError,
|
||||
"Got unexpected TimeZone object in conversion to Calendar"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue