Tomasz Mularczyk
Tomasz Mularczyk

Reputation: 36179

WebStorm. Run Jest in watch mode

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".

Upvotes: 4

Views: 1354

Answers (2)

lena
lena

Reputation: 93748

Jest -watch support will be provided in 2017.3. Please see https://youtrack.jetbrains.com/issue/WEB-26205

Upvotes: 1

Oksana
Oksana

Reputation: 857

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.

Upvotes: 2

Related Questions