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

LibJS: Implement Temporal.PlainDateTime.prototype.toPlainDate()

This commit is contained in:
Linus Groh 2021-07-23 00:39:18 +01:00
parent 61b2780853
commit 18fd0d4011
4 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,11 @@
describe("normal behavior", () => {
test("length is 0", () => {
expect(Temporal.PlainDateTime.prototype.toPlainDate).toHaveLength(0);
});
test("basic functionality", () => {
const plainDateTime = new Temporal.PlainDateTime(2021, 7, 23, 0, 32, 18, 123, 456, 789);
const plainDate = plainDateTime.toPlainDate();
expect(plainDate.equals(new Temporal.PlainDate(2021, 7, 23))).toBeTrue();
});
});