mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibJS/Tests: Add test for Temporal.Instant.prototype.valueOf()
This commit is contained in:
parent
173630c5ef
commit
9d7e391f94
Notes:
sideshowbarker
2024-07-18 08:57:20 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/9d7e391f945 Pull-request: https://github.com/SerenityOS/serenity/pull/8794 Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 7 additions and 0 deletions
|
@ -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");
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue