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

LibJS: Implement Temporal.Calendar.prototype.year

This commit is contained in:
Idan Horowitz 2021-07-23 16:35:36 +03:00 committed by Linus Groh
parent 9fa8f19a0f
commit 3895a8354d
5 changed files with 59 additions and 1 deletions

View file

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