diff --git a/Userland/Libraries/LibJS/Tests/builtins/Temporal/Instant/Instant.prototype.valueOf.js b/Userland/Libraries/LibJS/Tests/builtins/Temporal/Instant/Instant.prototype.valueOf.js new file mode 100644 index 0000000000..1bffce949b --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/builtins/Temporal/Instant/Instant.prototype.valueOf.js @@ -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"); + }); +});