LibJS: Implement Temporal.Duration.prototype.valueOf()

This commit is contained in:
Linus Groh 2021-07-16 00:24:23 +01:00
commit 8daf35e1b1
Notes: sideshowbarker 2024-07-18 08:57:27 +09:00
3 changed files with 19 additions and 0 deletions

View file

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