mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 13:32:23 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainDate()
This commit is contained in:
parent
61b2780853
commit
18fd0d4011
Notes:
sideshowbarker
2024-07-18 08:30:05 +09:00
Author: https://github.com/linusg
Commit: 18fd0d4011
Pull-request: https://github.com/SerenityOS/serenity/pull/8947
Reviewed-by: https://github.com/IdanHo ✅
4 changed files with 28 additions and 0 deletions
|
@ -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();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue