Skip to content

fix(test-runner-core): await browser cleanup in watch mode - #3169

Open
raashish1601 wants to merge 1 commit into
modernweb-dev:masterfrom
raashish1601:fix/watch-browser-shutdown-codex-e
Open

raashish1601 wants to merge 1 commit into
modernweb-dev:masterfrom
raashish1601:fix/watch-browser-shutdown-codex-e

Conversation

@raashish1601

Copy link
Copy Markdown

What I did

Watch-mode shutdown puts browser cleanup promises into a shadowed local array, so stop() can resolve and emit stopped while a browser is still closing. The CLI exits on that event.

Removed the shadowed declaration so shutdown awaits both server and browser cleanup. Added a regression that holds browser cleanup open after the real server has stopped, plus a patch changeset.

Validation:

  • The new regression fails on upstream because stopped fires before browser cleanup finishes.
  • npm run build passes.
  • All 23 core Node tests pass with one worker.
  • Full ESLint, changed-file Prettier, repository-wide Prettier, and the normal precommit hook pass.

These local results cover the core package; broader repository CI has not been run locally.

Developed with OpenAI Codex assistance.

@changeset-bot

changeset-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d18c4b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/test-runner-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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