LibJS: Implement Temporal.PlainDateTime.prototype.valueOf

This commit is contained in:
Timothy Flynn 2024-11-23 19:16:11 -05:00 committed by Andreas Kling
commit d22ea4db4c
Notes: github-actions[bot] 2024-11-24 10:44:57 +00:00
3 changed files with 19 additions and 0 deletions

View file

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