mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-26 04:02:27 +00:00
And the simple Temporal.PlainDate.prototype getters, so that the constructed Temporal.PlainDate may actually be validated.
13 lines
547 B
JavaScript
13 lines
547 B
JavaScript
describe("correct behavior", () => {
|
|
test("length is 2", () => {
|
|
expect(Temporal.PlainDate.compare).toHaveLength(2);
|
|
});
|
|
|
|
test("basic functionality", () => {
|
|
const plainDate1 = new Temporal.PlainDate(2021, 7, 26);
|
|
expect(Temporal.PlainDate.compare(plainDate1, plainDate1)).toBe(0);
|
|
const plainDate2 = new Temporal.PlainDate(2021, 7, 27);
|
|
expect(Temporal.PlainDate.compare(plainDate1, plainDate2)).toBe(-1);
|
|
expect(Temporal.PlainDate.compare(plainDate2, plainDate1)).toBe(1);
|
|
});
|
|
});
|