Skip to content

Commit

Permalink
LibJS/Tests: Add test for Temporal.Instant.prototype.valueOf()
Browse files Browse the repository at this point in the history
  • Loading branch information
linusg committed Jul 16, 2021
1 parent 173630c commit 9d7e391
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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");
});
});

0 comments on commit 9d7e391

Please sign in to comment.