1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 12:37:44 +00:00

LibJS: Implement Temporal.PlainTime.prototype.equals()

This commit is contained in:
Idan Horowitz 2021-08-27 18:57:39 +03:00 committed by Linus Groh
parent 684e62476b
commit 0f464f38d3
3 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,12 @@
describe("correct behavior", () => {
test("length is 1", () => {
expect(Temporal.PlainTime.prototype.equals).toHaveLength(1);
});
test("basic functionality", () => {
const firstPlainTime = new Temporal.PlainTime(1, 1, 1, 1, 1, 1);
const secondPlainTime = new Temporal.PlainTime(0, 1, 1, 1, 1, 1);
expect(firstPlainTime.equals(firstPlainTime));
expect(!secondPlainTime.equals(secondPlainTime));
});
});