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

LibJS: Implement Temporal.ZonedDateTime.prototype.valueOf()

This commit is contained in:
Linus Groh 2021-08-05 21:35:40 +01:00
parent 3e909c0c49
commit 20300bd7c4
3 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,11 @@
test("errors", () => {
test("throws TypeError", () => {
const timeZone = new Temporal.TimeZone("UTC");
expect(() => {
new Temporal.ZonedDateTime(0n, timeZone).valueOf();
}).toThrowWithMessage(
TypeError,
"Cannot convert Temporal.ZonedDateTime to a primitive value"
);
});
});