mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:37:35 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainYearMonth()
This commit is contained in:
parent
ed5ae7b093
commit
5573efa3bd
3 changed files with 42 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.PlainDateTime.prototype.toPlainYearMonth).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(2021, 7, 6, 18, 14, 47);
|
||||
const plainYearMonth = plainDateTime.toPlainYearMonth();
|
||||
expect(plainYearMonth.calendar).toBe(plainDateTime.calendar);
|
||||
expect(plainYearMonth.year).toBe(2021);
|
||||
expect(plainYearMonth.month).toBe(7);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue