LibJS/Tests: Add test for PlainMonthDay default reference year

This commit is contained in:
Linus Groh 2021-08-15 01:23:07 +01:00
parent 8f7a9e1e5c
commit 4520863c0e
Notes: sideshowbarker 2024-07-18 05:41:32 +09:00

View file

@ -50,4 +50,10 @@ describe("normal behavior", () => {
expect(plainMonthDay).toBeInstanceOf(Temporal.PlainMonthDay);
expect(Object.getPrototypeOf(plainMonthDay)).toBe(Temporal.PlainMonthDay.prototype);
});
test("default reference year is 1972", () => {
const plainMonthDay = new Temporal.PlainMonthDay(7, 6);
const fields = plainMonthDay.getISOFields();
expect(fields.isoYear).toBe(1972);
});
});