vitest-dev / vitest-dev/vitest

Use `b` in watch mode to restart the browser server

Open
#7,678 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2-nice-to-have
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

Clear and concise description of the problem

When running in watch mode, sometimes the browser instance is in a bad state, causing all browser tests to time out.

I have to quit the watch mode and restart.

Suggested solution

Instead of having b to do press b to start the browser server if not started yet,
use it to restart the browser instance(s) so we don't need to restart watch mode.

Alternative

Automatically detect dead browser and restart. To do that need to add a special heartbeat command to ensure the browser is still in good shape. However, determine what does "good shape" means could be challenging.

Additional context

No response

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing watch-mode handling of the b key and the browser server lifecycle; done means pressing b restarts the browser instance or instances without restarting watch mode, with coverage for the restart behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.