LibJS: Implement Temporal.PlainMonthDay.prototype.valueOf

This commit is contained in:
Timothy Flynn 2024-11-20 18:12:23 -05:00 committed by Tim Flynn
commit 64811ab7b6
Notes: github-actions[bot] 2024-11-22 00:25:23 +00:00
3 changed files with 20 additions and 0 deletions

View file

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