-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--watch
mode re-runs all tests on file change, docs are not clear.
#10651
Comments
Yes, it should work as you stated (although 'related to changed files' also means changes to a file that the test imports). Please make a repro. |
@jeysal this is really strange So this is what I see in th console after I change I expect to see only PASS info related to test-a, but there is b-test info also. So it is not expected jest's behavior, right? |
To be clear, changed refers to the current commit as a base. So if you change a and then b, they will now always run until you commit the changes. |
@jeysal |
No, that is not possible (at least with Jest alone). |
@jeysal couple related questions on the issue:
|
|
Any ideas how? At least in |
Watch plugins use |
@jeysal on SO usually difficult to get this level of expertise and people who have it.
But I believe neither options are available now. Should I create an issue on this? UPD: So there is a way to run I've made a PR for passing need options #10659. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
Docs state:
I have two files:
a.test.js
with A test suite.b.test.js
with B test suite.To me, this sounds like if I change file
a.test.js
then jest only runs test from changed filea.test.js
. But Jest reruns all the tests from all two files.To Reproduce
This is easy to reproduce. I will make a repo if needed. I just want confirmation. That it is not expected behavior. And if it is expected then docs should be updated. And I wonder what is the advice on this issue.
Expected behavior
Run only tests from the changed file.
Link to repl or repo (highly encouraged)
envinfo
The text was updated successfully, but these errors were encountered: