In package.json there is the following task:
{
"test": "nx run-many --target=test --code-coverage --projects=myproject, anotherproject --parallel --maxParallel"
}
Now for just the Angular project 'myproject' I would like to run only in a specific folder.
That would be able with the command line argument: --test-path-pattern=\".*specific-folder($|.*.[spec.ts])\"
.
However, since I am running tasks in parallel setting such a command line argument would apply to all the projects rather than just one.
Is it possible to configure this in a different way?
Via Jest config it's possible to target files/folders.
jest.config.ts
Either via testMatch or testRegex.
Now you can just run the project's tests and it will only target files in that folder.