mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
LibJS: Implement the Temporal.PlainTime constructor
And the simple Temporal.PlainTime.prototype getters, so that the constructed Temporal.PlainTime may actually be validated.
This commit is contained in:
parent
971f794127
commit
66365fef57
Notes:
github-actions[bot]
2024-11-24 00:38:03 +00:00
Author: https://github.com/trflynn89
Commit: 66365fef57
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2535
22 changed files with 693 additions and 1 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 2", () => {
|
||||
expect(Temporal.PlainTime.compare).toHaveLength(2);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainTime1 = new Temporal.PlainTime(16, 38, 40, 1, 2, 3);
|
||||
expect(Temporal.PlainTime.compare(plainTime1, plainTime1)).toBe(0);
|
||||
const plainTime2 = new Temporal.PlainTime(16, 39, 5, 0, 1, 2);
|
||||
expect(Temporal.PlainTime.compare(plainTime1, plainTime2)).toBe(-1);
|
||||
expect(Temporal.PlainTime.compare(plainTime2, plainTime1)).toBe(1);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue