mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibJS: Implement stringification Temporal.PlainMonthDay prototypes
This commit is contained in:
parent
1a386e78c3
commit
5bccb36a6f
Notes:
github-actions[bot]
2024-11-22 00:25:37 +00:00
Author: https://github.com/trflynn89
Commit: 5bccb36a6f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2471
14 changed files with 238 additions and 7 deletions
|
@ -57,10 +57,10 @@ describe("normal behavior", () => {
|
|||
expect(Object.getPrototypeOf(plainMonthDay)).toBe(Temporal.PlainMonthDay.prototype);
|
||||
});
|
||||
|
||||
// FIXME: Re-implement this test with Temporal.PlainMonthDay.prototype.toString({ calendarName: "always" }).
|
||||
// test("default reference year is 1972", () => {
|
||||
// const plainMonthDay = new Temporal.PlainMonthDay(7, 6);
|
||||
// const fields = plainMonthDay.getISOFields();
|
||||
// expect(fields.isoYear).toBe(1972);
|
||||
// });
|
||||
test("default reference year is 1972", () => {
|
||||
const plainMonthDay = new Temporal.PlainMonthDay(7, 6);
|
||||
const fields = plainMonthDay.toString({ calendarName: "always" });
|
||||
const year = fields.split("-")[0];
|
||||
expect(year).toBe("1972");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue