Skip to content

Add Temporal.ZonedDateTime tests#30296

Closed
robobun wants to merge 2 commits into
mainfrom
farm/65bfe965/temporal-zoneddatetime
Closed

Add Temporal.ZonedDateTime tests#30296
robobun wants to merge 2 commits into
mainfrom
farm/65bfe965/temporal-zoneddatetime

Conversation

@robobun

@robobun robobun commented May 5, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds tests for Temporal.ZonedDateTime and the Temporal.Now.{zonedDateTimeISO,plainDateISO,plainTimeISO,plainDateTimeISO} functions.

Blocked on oven-sh/WebKit#218 — these tests exercise the JSC implementation added there. They will fail in CI until that PR is merged and the WebKit hash is bumped. Opening as a draft so the tests are ready to land alongside the bump.

Part of #15853.

How did you verify your code works?

Built locally with --profile=debug-local against the WebKit branch:

test/js/web/temporal/temporal-zoneddatetime.test.ts:
(pass) Temporal.ZonedDateTime exists
(pass) Temporal.ZonedDateTime constructor + getters at Unix epoch in UTC
(pass) Temporal.ZonedDateTime offset time zone
(pass) Temporal.ZonedDateTime named IANA zone honors DST
(pass) Temporal.ZonedDateTime conversions
(pass) Temporal.ZonedDateTime negative epoch (sub-nanosecond boundary)
(pass) Temporal.ZonedDateTime.compare and equals
(pass) Temporal.ZonedDateTime error handling
(pass) Temporal.Now additions (zonedDateTimeISO/plainDateISO/plainTimeISO/plainDateTimeISO)
(pass) Temporal.Instant.from accepts ZonedDateTime
 10 pass  0 fail

All 10 tests fail against current prebuilt WebKit (Temporal.ZonedDateTime is undefined).

Covers the ZonedDateTime constructor, getters, conversions, DST
handling via ICU, negative-epoch edge cases, compare/equals, and the
new Temporal.Now.{zonedDateTimeISO,plainDateISO,plainTimeISO,
plainDateTimeISO} functions.

Requires oven-sh/WebKit#218; tests will fail until the WebKit hash is
bumped to include that change.
@robobun

robobun commented May 5, 2026

Copy link
Copy Markdown
Collaborator Author
Updated 5:08 PM PT - May 5th, 2026

@robobun, your commit e064ec3 has 1 failures in Build #51916 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 30296

That installs a local version of the PR into your bun-30296 executable, so you can run:

bun-30296 --bun

@github-actions github-actions Bot added the claude label May 5, 2026
The implementation lives in oven-sh/WebKit (#218/#219/#220), not in
this repo's src/. Probe the tested bunExe() binary once at module
load and skipIf when Temporal.ZonedDateTime is undefined, so CI stays
green on prebuilt-WebKit builds and the tests auto-activate once the
WebKit hash is bumped.
@robobun

robobun commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this draft. The Temporal.ZonedDateTime implementation lives entirely in JavaScriptCore — see the stacked PRs on oven-sh/WebKit:

This Bun PR contained only test/** with no src/** change, so there is nothing for the test-proof gate to validate against, and CI is red only from pre-existing failures on main (oxlint in src/js/internal/sql/errors.ts, test-http-should-emit-close-when-connection-is-aborted.ts timeout on Windows) — the temporal test itself ran cleanly (10 skip / 0 fail).

These tests are preserved on branch farm/65bfe965/temporal-zoneddatetime and should land in the PR that bumps the WebKit hash once the WebKit stack merges. Coverage in the meantime is provided by JSTests/stress/temporal-zoneddatetime.js in the WebKit PRs.

Part of #15853.

@robobun robobun closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant