mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
LibJS: Implement Temporal.PlainDate.prototype.toPlainYearMonth()
This commit is contained in:
parent
ed9d37bd40
commit
6709c915aa
6 changed files with 75 additions and 1 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.PlainDate.prototype.toPlainYearMonth).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainDate = new Temporal.PlainDate(2021, 7, 6);
|
||||
const plainYearMonth = plainDate.toPlainYearMonth();
|
||||
expect(plainYearMonth.calendar).toBe(plainDate.calendar);
|
||||
expect(plainYearMonth.year).toBe(2021);
|
||||
expect(plainYearMonth.month).toBe(7);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue