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