I am able to run the full Jest test suite from package.json in IntelliJ eg.
"test": "jest --no-cache --runInBand --config ./jest.json"
As you can see i'm using a jest.json config file and this works fine.
Now when i want run run an individual test and have to edit the run configuration each time.
The steps:
click on the green arrows to start the test
I get a load of errors (which i don't think are related)
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-jest": "^24.9.0"
Don't try to install it manually: your package manager does it automatically. However, a different version of babel-jest was detected higher up in the tree:
To overcome this i have to select 'Modify Run Configurations' which presents me with:
I have to set manually select the jest.json config file from the project directory and then change the jest package to jest:
This is now starting to become very tedious after many months.
Surely it should automatically be able to remember the last config but it always seems to default to the first image - with no config file selected and the jest package as react instead of jest.
Again, running the tests from package.json is fine but individual tests have to have 'Edit Run Config' settings set each time. Surely i should be able to just click the green arrow in the spec file to run?
Any fixes for this?



