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

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

View file

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