mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
LibJS: Implement Temporal.PlainMonthDay.prototype.equals
This commit is contained in:
parent
2d5b15295a
commit
3548b08de2
3 changed files with 47 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.PlainMonthDay.prototype.equals).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const firstPlainMonthDay = new Temporal.PlainMonthDay(2, 1, calendar);
|
||||
const secondPlainMonthDay = new Temporal.PlainMonthDay(1, 1, calendar);
|
||||
expect(firstPlainMonthDay.equals(firstPlainMonthDay)).toBeTrue();
|
||||
expect(secondPlainMonthDay.equals(secondPlainMonthDay)).toBeTrue();
|
||||
expect(firstPlainMonthDay.equals(secondPlainMonthDay)).toBeFalse();
|
||||
expect(secondPlainMonthDay.equals(firstPlainMonthDay)).toBeFalse();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue