Skip to content

Fix .todoIf() on test.skip chain in webview.test.ts#28733

Merged
cirospaciari merged 1 commit into
mainfrom
claude/fix-webview-todoif-on-skip
Mar 31, 2026
Merged

Fix .todoIf() on test.skip chain in webview.test.ts#28733
cirospaciari merged 1 commit into
mainfrom
claude/fix-webview-todoif-on-skip

Conversation

@cirospaciari

Copy link
Copy Markdown
Member

Line 51 aliases it = isMacOS ? test : test.skip. On non-macOS platforms, it.todoIf(isCI) at line 470 becomes test.skip.todoIf() which throws Cannot call .todoIf() on test.skip at file load time — the test file fails to load on Linux/Windows CI.

Use the same pattern already established at line 431: (isMacOS ? test.todoIf(isCI) : test.skip)(...) — select the modifier chain upfront instead of chaining .todoIf() onto the already-skipped it alias.

Line 51 aliases `it = isMacOS ? test : test.skip`. On non-macOS
platforms, `it.todoIf(isCI)` at line 470 becomes `test.skip.todoIf()`
which throws "Cannot call .todoIf() on test.skip" at load time.

Use the same pattern as line 431: `(isMacOS ? test.todoIf(isCI) : test.skip)`
to select the modifier chain upfront instead of chaining on the
already-skipped `it` alias.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

@robobun

robobun commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator
Updated 3:56 PM PT - Mar 31st, 2026

@cirospaciari, your commit 98cb61a has 4 failures in Build #43058 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 28733

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

bun-28733 --bun

@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d12d5715-17e9-4bb0-aeeb-1ac38501e23f

📥 Commits

Reviewing files that changed from the base of the PR and between 590708e and 98cb61a.

📒 Files selected for processing (1)
  • test/js/bun/webview/webview.test.ts

Walkthrough

A test case registration in the webview test file is modified to depend on the platform. The test's conditional logic now applies test.todoIf(isCI) only on macOS and uses test.skip on other platforms, altering CI behavior across platforms.

Changes

Cohort / File(s) Summary
Platform-Conditional Test Registration
test/js/bun/webview/webview.test.ts
Modified test registration logic to make the click(selector) waits for actionability, clicks center test conditionally skip on non-macOS platforms while maintaining CI-conditional todo behavior on macOS.
🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description explains the problem, root cause, and solution clearly, but does not follow the repository's required template with 'What does this PR do?' and 'How did you verify your code works?' sections. Restructure the description to follow the template: add 'What does this PR do?' and 'How did you verify your code works?' sections with appropriate content.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the specific fix: addressing the .todoIf() method being incorrectly called on test.skip, which causes a runtime error on non-macOS platforms.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cirospaciari cirospaciari merged commit 3ed4186 into main Mar 31, 2026
59 of 63 checks passed
@cirospaciari cirospaciari deleted the claude/fix-webview-todoif-on-skip branch March 31, 2026 22:12
dylan-conway added a commit that referenced this pull request Apr 6, 2026
`click(selector)` / `scrollTo(selector)` poll for actionability by
waiting on `requestAnimationFrame` between checks. On macOS CI the
headless `WKWebView` gets no `CVDisplayLink` callbacks (no display
attached), so rAF never fires and these tests hang to the per-file
timeout.

Consolidates the eight rAF-dependent tests under an `itRendering` alias
(`todoIf(isCI)` on macOS, `skip` elsewhere). Replaces the
`it.todoIf(isCI)` at :493 which on non-macOS became `test.skip.todoIf()`
and threw at file load — regression of #28733.

Also fixes `webview-chrome.test.ts:668`: `await expect(await
view.click(...)).rejects.toThrow()` — the stray inner `await`
(introduced in 2f6f266) made the rejection throw before `.rejects`
could catch it. Only surfaced on alpine CI since that's the only image
with Chrome installed.

Supersedes #28618 (which covered 3 of the 5 newly-skipped tests).

All eight still run locally.

- `webview.test.ts` local: 57 pass / 1 todo / 0 fail
- `webview.test.ts` `CI=true`: 49 pass / 9 todo / 0 fail
- `webview-chrome.test.ts` local: 52 pass / 0 fail

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
structwafel pushed a commit to structwafel/bun that referenced this pull request Apr 25, 2026
Line 51 aliases `it = isMacOS ? test : test.skip`. On non-macOS
platforms, `it.todoIf(isCI)` at line 470 becomes `test.skip.todoIf()`
which throws `Cannot call .todoIf() on test.skip` at file load time —
the test file fails to load on Linux/Windows CI.

Use the same pattern already established at line 431: `(isMacOS ?
test.todoIf(isCI) : test.skip)(...)` — select the modifier chain upfront
instead of chaining `.todoIf()` onto the already-skipped `it` alias.
structwafel pushed a commit to structwafel/bun that referenced this pull request Apr 25, 2026
`click(selector)` / `scrollTo(selector)` poll for actionability by
waiting on `requestAnimationFrame` between checks. On macOS CI the
headless `WKWebView` gets no `CVDisplayLink` callbacks (no display
attached), so rAF never fires and these tests hang to the per-file
timeout.

Consolidates the eight rAF-dependent tests under an `itRendering` alias
(`todoIf(isCI)` on macOS, `skip` elsewhere). Replaces the
`it.todoIf(isCI)` at :493 which on non-macOS became `test.skip.todoIf()`
and threw at file load — regression of oven-sh#28733.

Also fixes `webview-chrome.test.ts:668`: `await expect(await
view.click(...)).rejects.toThrow()` — the stray inner `await`
(introduced in 2f6f266) made the rejection throw before `.rejects`
could catch it. Only surfaced on alpine CI since that's the only image
with Chrome installed.

Supersedes oven-sh#28618 (which covered 3 of the 5 newly-skipped tests).

All eight still run locally.

- `webview.test.ts` local: 57 pass / 1 todo / 0 fail
- `webview.test.ts` `CI=true`: 49 pass / 9 todo / 0 fail
- `webview-chrome.test.ts` local: 52 pass / 0 fail

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
xhjkl pushed a commit to xhjkl/bun that referenced this pull request May 14, 2026
Line 51 aliases `it = isMacOS ? test : test.skip`. On non-macOS
platforms, `it.todoIf(isCI)` at line 470 becomes `test.skip.todoIf()`
which throws `Cannot call .todoIf() on test.skip` at file load time —
the test file fails to load on Linux/Windows CI.

Use the same pattern already established at line 431: `(isMacOS ?
test.todoIf(isCI) : test.skip)(...)` — select the modifier chain upfront
instead of chaining `.todoIf()` onto the already-skipped `it` alias.
xhjkl pushed a commit to xhjkl/bun that referenced this pull request May 14, 2026
`click(selector)` / `scrollTo(selector)` poll for actionability by
waiting on `requestAnimationFrame` between checks. On macOS CI the
headless `WKWebView` gets no `CVDisplayLink` callbacks (no display
attached), so rAF never fires and these tests hang to the per-file
timeout.

Consolidates the eight rAF-dependent tests under an `itRendering` alias
(`todoIf(isCI)` on macOS, `skip` elsewhere). Replaces the
`it.todoIf(isCI)` at :493 which on non-macOS became `test.skip.todoIf()`
and threw at file load — regression of oven-sh#28733.

Also fixes `webview-chrome.test.ts:668`: `await expect(await
view.click(...)).rejects.toThrow()` — the stray inner `await`
(introduced in 2f6f266) made the rejection throw before `.rejects`
could catch it. Only surfaced on alpine CI since that's the only image
with Chrome installed.

Supersedes oven-sh#28618 (which covered 3 of the 5 newly-skipped tests).

All eight still run locally.

- `webview.test.ts` local: 57 pass / 1 todo / 0 fail
- `webview.test.ts` `CI=true`: 49 pass / 9 todo / 0 fail
- `webview-chrome.test.ts` local: 52 pass / 0 fail

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants