WebStorm. Run Jest in watch mode

Viewed 809

I see that WebStorm supports Jest testing, and I see that I can toggle auto-test on code changes. But that's not the same as Jest --watch mode which is lot faster.

Is it possible to configure watch mode somehow?

enter image description here

EDIT I found out that I can pass --watch option to each test config, but I would have to do it for every file, and also it's not possible to use Jest watch options like e.g. "filter".

2 Answers

You can edit the default Jest configuration and add --watch in Jest options. Every new configuration will contain this option.

By the way, could you please tell how you are going to use --watch in every configuration? As far as I know, this option usually is used for all tests in one config.

Moreover, please provide more details and documentation on filter option you mentioned.

Related