mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibJS: Implement stringification Temporal.PlainYearMonth prototypes
This commit is contained in:
parent
b68d67693e
commit
2da526423f
Notes:
github-actions[bot]
2024-11-22 18:56:48 +00:00
Author: https://github.com/trflynn89
Commit: 2da526423f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2496
8 changed files with 193 additions and 6 deletions
|
@ -51,10 +51,10 @@ describe("normal behavior", () => {
|
|||
expect(Object.getPrototypeOf(plainYearMonth)).toBe(Temporal.PlainYearMonth.prototype);
|
||||
});
|
||||
|
||||
// FIXME: Re-implement this test with Temporal.PlainYearMonth.prototype.toString({ calendarName: "always" }).
|
||||
// test("default reference day is 1", () => {
|
||||
// const plainYearMonth = new Temporal.PlainYearMonth(2021, 7);
|
||||
// const fields = plainYearMonth.getISOFields();
|
||||
// expect(fields.isoDay).toBe(1);
|
||||
// });
|
||||
test("default reference day is 1", () => {
|
||||
const plainYearMonth = new Temporal.PlainYearMonth(2021, 7);
|
||||
const fields = plainYearMonth.toString({ calendarName: "always" });
|
||||
const day = fields.split("-")[2].split("[")[0];
|
||||
expect(day).toBe("01");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue