LibJS: Implement Temporal.Duration.prototype.valueOf

This commit is contained in:
Timothy Flynn 2024-11-18 15:47:11 -05:00 committed by Tim Flynn
commit f57ff63432
Notes: github-actions[bot] 2024-11-21 00:05:28 +00:00
3 changed files with 16 additions and 0 deletions

View file

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