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

LibJS/Tests: Add test for PlainYearMonth default reference day

This commit is contained in:
Linus Groh 2021-08-15 01:22:52 +01:00
parent 1549845389
commit 8f7a9e1e5c

View file

@ -50,4 +50,10 @@ describe("normal behavior", () => {
expect(plainYearMonth).toBeInstanceOf(Temporal.PlainYearMonth);
expect(Object.getPrototypeOf(plainYearMonth)).toBe(Temporal.PlainYearMonth.prototype);
});
test("default reference day is 1", () => {
const plainYearMonth = new Temporal.PlainYearMonth(2021, 7);
const fields = plainYearMonth.getISOFields();
expect(fields.isoDay).toBe(1);
});
});