Jest watch mode improvement request

Jest is awesome, and the integration into WebStorm is awesome as well!! So thanks for the product for the very first as it's my first time leaving a note on WebStorm forum.

The improvement I would love to see is the 500ms to 1s delay when you make some change to the code and wait for the Jest configuration panel to re-run and gives you the green-or-red feedback. I am turning on the `--watch` option for a possible faster feedback when I'm doing TDD or modifying some code, and I think it's pretty close to what I see as a perfect solution to getting feedback instantly. And now the one last mile toward perfection is that 500ms(~1s) that you have to wait after you make some changes(and sometimes a very minor change), which is kind of breaking your mental mind flow when programming. I might be picky but this is something I really wish to see improvements. Every second counts if you run that every hour and every day of the development right? 

I make a video to demo a usual workflow using Jest with WebStorm. Let me know for any feedback, suggestions and contact me if you need any project/application configurations for further investigation.

1
4 comments

I can tell for sure that there are no artificial delays here:). And, to me, delay is more or less the same as when running Jest with --watch in terminal. Actually this is Jest that is watching file system events - as soon as it detects a change, the tests are re-built and re-run. The only issue here is that there is no way to be notified on Jest session start via Jest API, so WebStorm is listening to Jest output: once the first output is produced, the tests tree re-building is triggered

0
Avatar
Permanently deleted user

Yeap I feel the same delay running Jest in terminal, and so seems like there's not much WebStorm can do if there's no way to listen on Jest session start. Or can we display some loading effect in WebStorm side as long as I make some file changes? Otherwise I can go to the Jest repo and see if this is some enhancement that people already found also matter to them. 

Thanks for the quick reply Elena :) 

0

Our investigations show that there is still some room for improvements (and that we can actually get notified on session start). Please follow https://youtrack.jetbrains.com/issue/WEB-29565 for updates

0
Avatar
Permanently deleted user

Looks like the issue is exactly requesting what I would like to improve with more details. Will follow on that one and I think this one can be closed. 

 

0

Please sign in to leave a comment.