Skip to content

test(extension): fix startup race in pointer browser test - #51

Merged
karngyan merged 1 commit into
mainfrom
fix/pointer-test-target-race
Oct 2, 2026
Merged

karngyan merged 1 commit into
mainfrom
fix/pointer-test-target-race

Conversation

@karngyan

@karngyan karngyan commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

The Version Packages PR (#47) failed CI in pointer.browser.test.ts setup:

Error: no page target in []
 ❯ src/lib/pointer.browser.test.ts:386:24

Chrome prints DevTools listening on ws://… before it registers the startup about:blank tab. On a slow runner the single GET /json/list can land in that gap and return []. Nothing in #47 caused it; the release PR just hit the race.

Fix: poll /json/list every 50ms until a page target shows up, inside the existing 5s step budget. On timeout the error includes the last listing.

Test plan

  • vitest run src/lib/pointer.browser.test.ts: 56/56 pass, 3 runs in a row against real Chrome
  • tsc, biome clean
  • CI green here, then re-run Version Packages #47's build

🤖 Generated with Claude Code

…er test

Chrome prints "DevTools listening" before it registers the startup tab, so
on a slow CI runner /json/list can come back empty and setup fails with
"no page target in []". Poll until a page target appears, within the
existing 5s step budget, and report the last listing on timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karngyan
karngyan merged commit 31b5a2b into main Oct 2, 2026
2 checks passed
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.

1 participant