All tests re-run on every change
See original GitHub issueEnvironment
-
node -v
: 8.11.1 -
npm -v
: 5.6.0 -
Operating system: macOS High Sierra
Steps to Reproduce
Save a change to any specific test.
Expected Behavior
Only the changed file’s tests are re-run, leading to quick feedback on test success/failure as a result of the change.
Actual Behavior
All tests in the entire project are re-run, potentially taking a very long time before finding out if the one modified test passes/fails.
This appears to be a regression due to #325 . As one who didn’t have problems with the previous behavior, it would be very nice if this could at least be made an optional setting for those who need it.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Rerun unit tests affected by change [closed]
It seems like every bit of data required to build the list of affected tests is in place: set of changed lines could...
Read more >Watches code and tests for changes, rerunning tests ... - testthat
Details. The current strategy for rerunning tests is as follows: if any code has changed, then those files are reloaded and all tests...
Read more >How to run Gradle test when all tests are UP-TO-DATE?
Gradle will unpack the test results from the build cache after the output has been cleaned, so nothing will be rerun. In short,...
Read more >Rerun and debug tests | PyCharm Documentation - JetBrains
PyCharm lets you rerun run/debug configuration of a test automatically, if the source code has been changed. To enable autotest-like runner ...
Read more >Run jest for unit tests of modified files only | by SunCommander
We tackled this by referring to this. We checked if any package version has changed, then run all the tests, else run with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The
--watch
option will use Git or Mercurial to detect the changed files. This is the default mode. Using--watchAll
will rerun everything when any file changes. The long game is to:jest --watch
fails because Git or Mercurial have not been configured and startjest --watch
with a notification to the userI’m unfamiliar with the root cause of #325, but it should be relatively straight forward to investigate.
Also … HUGE thanks for debugging this. 🎉