Running single test with saved configuration

In webstorm, it is possible to create configurations to run all tests, but I can not find possiblity to run one test with a selected saved configuration.

For example, I have a saved configuration but I can't select it for just one particular test.
I'm having difficulty with this since I have about 5 different configurations (different environment variables, scripts that are executed before the test is run). 
I would like to be able to select one of the 5 configurations before each run of one test. Modifying configuration for each test with "Modify run configuration..." before running each test is time consuming.

Is it possible to do this? 
And when running tests, webstorm uses the jest command (jest --config=...) can I replace the standard command with the command from package.json?

Use tests on Jest with TS

0
1 comment

There is no way to do this; related feature requests: https://youtrack.jetbrains.com/issue/WEB-32675/Run-individual-tests-with-the-last-config-they-were-ran, https://youtrack.jetbrains.com/issue/WEB-30900/Switch-run-configurations-when-executing-unit-tests

You can modify Jest run configuration template: all new configurations created when running a test from gutter inherit the settings from a template.

>And when running tests, webstorm uses the jest command (jest --config=...) can I replace the standard command with the command from package.json?

No, you can't use Jest run configuration to run npm scripts

0

Please sign in to leave a comment.