vitest-dev / vitest-dev/vitest

Feature request: loop test run until failure for watch mode

Open
#2,040 14 comments 9 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

sometime we have a flaky test in the suite. We think we have made a change which could fix the flaky spec, but how do we verify this?
You need to run the test like 100x in a row or something. With the current watch mode that would entail hitting enter key manually 100x.

Suggested solution

add run until failure mode to watch usage screen:
image

then you can just enable this, mode grab a ☕ and come back in a few minutes refreshed to see if the flakyness is fixed or not

Alternative

manually hitting enter key 100x

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

Start by tracing the watch mode usage screen and its current run-again interaction. Implement the requested run-until-failure option so a selected test repeats without manual Enter presses, and verify that the mode stops and reports the first failure.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.