1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:27:45 +00:00

LibJS: Implement Temporal.Calendar.prototype.monthCode

This commit is contained in:
Idan Horowitz 2021-07-23 16:56:38 +03:00 committed by Linus Groh
parent a0af9b11fb
commit 9d9ba29cae
5 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,11 @@
describe("correct behavior", () => {
test("length is 1", () => {
expect(Temporal.Calendar.prototype.monthCode).toHaveLength(1);
});
test("basic functionality", () => {
const calendar = new Temporal.Calendar("iso8601");
const date = new Temporal.PlainDate(2021, 7, 23);
expect(calendar.monthCode(date)).toBe("M07");
});
});