Running Jest in watch mode not working

I'm trying to get Jest tests to rerun upon file change rather than restarting the tests all over

I added --watch to the Jest option in the run/debug configuration, however after making changes, how do I trigger the test to rerun?

Intellij Ultimate 2021.2.3

1
3 comments

Using --watch option in run configuration works fine for me - as soon as I change the spec and hit Ctrl+S (File > Save All), the spec is re-run

0

It doesn't rerun the tests for me, even after hitting Cmd-S to save all (although I thought that was unnecessary since intellij auto saves?)  

Forgot to mention that I'm using Mac version of Intellij, not sure how that would make a difference?

0

I don't think OS makes a difference; did you try choosing File > Save All with a mouse (not using shortcuts) right after making changes to your tests?

0

Please sign in to leave a comment.