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
Notes: sideshowbarker 2024-07-18 08:57:20 +09:00

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");
});
});