LibJS: Implement the ECMA-402 PlainYearMonth.prototype.toLocaleString.js

This commit is contained in:
Timothy Flynn 2024-11-27 16:27:08 -05:00 committed by Andreas Kling
commit ac0292b18f
Notes: github-actions[bot] 2024-11-29 08:53:22 +00:00
2 changed files with 15 additions and 8 deletions

View file

@ -6,11 +6,8 @@ describe("correct behavior", () => {
test("basic functionality", () => {
let plainYearMonth;
plainYearMonth = new Temporal.PlainYearMonth(2021, 7);
expect(plainYearMonth.toLocaleString()).toBe("2021-07");
plainYearMonth = new Temporal.PlainYearMonth(2021, 7, "gregory", 6);
expect(plainYearMonth.toLocaleString()).toBe("2021-07-06[u-ca=gregory]");
plainYearMonth = new Temporal.PlainYearMonth(2021, 7, "gregory");
expect(plainYearMonth.toLocaleString()).toBe("7/2021");
});
});