vitest-dev / vitest-dev/vitest
Use `b` in watch mode to restart the browser server
Nobody has claimed this yet.
- 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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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