mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
14 lines
505 B
JavaScript
14 lines
505 B
JavaScript
|
|
describe("correct behavior", () => {
|
||
|
|
test("length is 2", () => {
|
||
|
|
expect(Temporal.Instant.compare).toHaveLength(2);
|
||
|
|
});
|
||
|
|
|
||
|
|
test("basic functionality", () => {
|
||
|
|
const instant1 = new Temporal.Instant(111n);
|
||
|
|
expect(Temporal.Instant.compare(instant1, instant1)).toBe(0);
|
||
|
|
const instant2 = new Temporal.Instant(999n);
|
||
|
|
expect(Temporal.Instant.compare(instant1, instant2)).toBe(-1);
|
||
|
|
expect(Temporal.Instant.compare(instant2, instant1)).toBe(1);
|
||
|
|
});
|
||
|
|
});
|