1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibJS/Tests: Add test for Temporal.Instant.prototype.valueOf()

This commit is contained in:
Linus Groh 2021-07-16 00:25:25 +01:00
parent 173630c5ef
commit 9d7e391f94

View file

@ -0,0 +1,7 @@
test("errors", () => {
test("throws TypeError", () => {
expect(() => {
new Temporal.Instant(0n).valueOf();
}).toThrowWithMessage(TypeError, "Cannot convert Temporal.Instant to a primitive value");
});
});