WebStorm - customizing the Jest testing command

WebStorm, by default, starts a test with the command `react-springs test --testNamePattern=pattern`

Since I'm using craco to override the default CRA config, I'd like it to be `craco test --testNamePattern=pattern`

 

Is it possible to change the default testing command?

1
3 comments

Try setting node_modules/@craco/craco as Jest package: in your Jest run configuration:

 

2
Avatar
Permanently deleted user

Не работает такая настройка. Когда запускаешь тест из редактора, где показывается номер строки, то ИДЕ берет настройки из реакт-скриптов

0

Работает. Просто вам нужно поменять template для Jest run конфигурации, прописав там соответствующий пакет - тогда все новый конфигурации (создаваемые из редактора в том числе) будут использовать @craco

0

Please sign in to leave a comment.