mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibJS: Handle ZonedDateTime in the various Temporal factories
This commit is contained in:
parent
8c73cae2b8
commit
3e6133cc09
Notes:
github-actions[bot]
2024-11-26 10:04:16 +00:00
Author: https://github.com/trflynn89
Commit: 3e6133cc09
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2577
Reviewed-by: https://github.com/shannonbooth ✅
8 changed files with 97 additions and 19 deletions
|
@ -34,6 +34,11 @@ describe("correct behavior", () => {
|
|||
expect(result).toBeInstanceOf(Temporal.Instant);
|
||||
expect(result.epochNanoseconds).toBe(0n);
|
||||
});
|
||||
|
||||
test("ZonedDateTime instance argument", () => {
|
||||
const zonedDateTime = new Temporal.ZonedDateTime(123n, "UTC");
|
||||
expect(Temporal.Instant.from(zonedDateTime).epochNanoseconds).toBe(123n);
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue