mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.equals()
This commit is contained in:
parent
9ed877e8e7
commit
32fc81c186
Notes:
sideshowbarker
2024-07-18 05:13:24 +09:00
Author: https://github.com/IdanHo
Commit: 32fc81c186
Pull-request: https://github.com/SerenityOS/serenity/pull/9636
Reviewed-by: https://github.com/linusg ✅
3 changed files with 40 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.PlainDateTime.prototype.equals).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const firstPlainDateTime = new Temporal.PlainDateTime(1, 1, 1, 1, 1, 1, 1, 1, 1, calendar);
|
||||
const secondPlainDateTime = new Temporal.PlainDateTime(0, 1, 1, 1, 1, 1, 1, 1, 1, calendar);
|
||||
expect(firstPlainDateTime.equals(firstPlainDateTime));
|
||||
expect(!firstPlainDateTime.equals(secondPlainDateTime));
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue