Do you want to request a feature or report a bug?
feature
What is the current behavior?
jest --watch will let you type a few keys to help you re-run tests.
What is the expected behavior?
It would be nice if I could type f or something to just re-run the tests that are currently failing.
For a large test suite, this would help to rapidly iterate on fixing specific problems.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
$ jest --version && yarn --version && node --version
v20.0.3
0.24.6
v6.10.3
Mac OS 10.12.5
pytest has a similar feature.
Here is a use case to explain how this could be useful:
o mode might not be as helpful.RSpec has a similar feature too, called --only-failures.
PR is most welcome! 馃榾
@kumar303
Can you take a look at #4886?
This will be in Jest 22.
Thank you @lsentkiewicz !
Was this feature added in 22? Can't find any documentation
@brandon-pereira:

Ah thanks, I was thinking more for running tests without the watch flag. Settled on using https://github.com/bZichett/jest-retry
Run only failed test feature works perfectly for TDD.
But once I fixed all the tests this mode became useless. It just says that there is nothing to run.
Would be great if there will be an option (or even default behavior) that when there are no failing tests, it will run all the tests again.
This way I can focus only on my editor and do TDD:
Agreed it would make sense to automatically quit the mode after a test run without failures, provided there is a clear and obvious message informing the user that this was done. Happy to take a PR for this :)
This worked for me:
"test": "cross-env DB_ENV=testing jest --watch -f --runInBand api/libraries/libraries.test.js"
Most helpful comment
@brandon-pereira: