You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in watch mode and pressing "f" to rerun failed tests, "rerun failed" is printed and failed tests are reran but the watcher does not remember that I pressed f on file changes. I would expect a file change to rerun only the failed tests as long as I have selected the "f" command like in Jest.
notice "rerun failed" is printed and the whole suite containing the failed test reruns
trigger a file change in basic.test.js
notice that only basic.test.js was reran, disregarding that I was in failure only mode.
I expected the watcher to stay in "rerun failed" mode, rerun suite.test.js, and behave in that way until I exit "rerun failed" mode by pressing "a" or "r".
### Used Package Manager
npm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
The text was updated successfully, but these errors were encountered:
The issue title is a bit misleading since failed tests are indeed run when f is pressed
Yes, sorry, I think I was confused because the output contained "rerun failed".
f filter does not persist when other files are changed
Yes, I think that this is the behavior that was most unexpected on my end. I would have liked the cli to keep running failed tests when triggering a file change.
Describe the bug
When in watch mode and pressing "f" to rerun failed tests, "rerun failed" is printed and failed tests are reran but the watcher does not remember that I pressed f on file changes. I would expect a file change to rerun only the failed tests as long as I have selected the "f" command like in Jest.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-5nbzar?file=test%2Fsuite.test.ts&issueNumber=3687&issueRepo=vitest-dev/vitest
I expected the watcher to stay in "rerun failed" mode, rerun suite.test.js, and behave in that way until I exit "rerun failed" mode by pressing "a" or "r".
System Info
But I have the same problem locally on
The text was updated successfully, but these errors were encountered: