LibJS: Implement Temporal.PlainYearMonth.prototype.valueOf

This commit is contained in:
Timothy Flynn 2024-11-21 19:11:16 -05:00 committed by Andreas Kling
commit b64ccb95ec
Notes: github-actions[bot] 2024-11-22 18:56:17 +00:00
3 changed files with 20 additions and 0 deletions

View file

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