Skip to content

Watch mode "f" command does not rerun failed tests #10247

@Nokel81

Description

@Nokel81

Describe the bug

  1. Given some test suites with more than one test exists
  2. When running tests in watch mode
  3. Given test A in suite α has failed
  4. When pressing the f shortcut
  5. Expects only test A to be rerun, instead all tests within α are run

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-mqt9hpxp?file=test%2Fsuite.test.ts

System Info

System:
    OS: macOS 26.3
    CPU: (10) arm64 Apple M5
    Memory: 151.45 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.14.1 - /Users/sebastianmalton/.nvm/versions/node/v24.14.1/bin/node
    npm: 11.11.0 - /Users/sebastianmalton/.nvm/versions/node/v24.14.1/bin/npm
    pnpm: 10.33.2 - /Users/sebastianmalton/.nvm/versions/node/v24.14.1/bin/pnpm
  Browsers:
    Firefox: 150.0
    Safari: 26.3
  npmPackages:
    @vitest/coverage-v8: 4.1.5 => 4.1.5
    vitest: ^4.1.5 => 4.1.5

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions