rtfeldman / rtfeldman/node-test-runner
Rerun only failed tests in watch mode
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 140
- Forks
- 83
- Avg merge
- 8h 25m
- Merged PRs (30d)
- 5
Description
Jacob on Slack had a cool idea, and I'm just gonna screencap it here:

Here's a design for how this could work:
- We now have the guarantee that each test has a unique description.
- We could use this as a unique identifier, and serialize the outcome of all tests to disk after a run. (e.g.
{"id": ["top-level describe", "nested describe", "my description"], "passed": true}.) - The next time we detect a watch change, we could diff the new tree of tests against the old one before running. Any test that had
passed: truelast time, we don't bother re-running this time. (This way, we automatically add any new tests to the mix.) - If the tests we re-ran all passed, then we can go back and re-run all the others to make sure they still pass.
- Profit!
Contributor guide
No contributing guide indexed for this repository
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
No files, tests, or entry points are named in the issue. Start by locating the watch-mode implementation and how test outcomes are represented, then trace how a watch change triggers execution. Done means persisted results can identify previously passing tests, rerun failed or new tests first, and run the remaining tests after those pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100