`nx test` does not run all tests
See original GitHub issueI recently updated my nrwl/nx workspace to the latest version. I noted that you aliased the ng
command to nx
! In this context, i noticed, that nx test
does not run all tests in the monorepository!
This may be a regression!
Current Behavior
nx test
does not run all tests in the monorepository,
ng test
does, in fact, run all! (as before!)
Expected Behavior
This may be a regression!
previously, i was able to run all my tests in the monorepo with ng test
, however nx test
does not run all tests.
Running nx test
from the cli, internally invokes the command ng run app-web:test
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
nx report
> NX Report complete - copy this into the issue template
@nrwl/angular : 9.4.3
@nrwl/cli : 9.4.3
@nrwl/cypress : 9.4.3
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 9.4.3
@nrwl/linter : 9.4.3
@nrwl/nest : 9.4.3
@nrwl/next : Not Found
@nrwl/node : 9.4.3
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.4.3
@nrwl/web : Not Found
@nrwl/workspace : 9.4.3
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:16
- Comments:12 (2 by maintainers)
Top Results From Across the Web
jestjs - @nrwl/nx angular Run all test for coverage in a single ...
run all projects I tried to run all tests in every app and library with the nx run-many command. I get a coverage...
Read more >run-many - CLI command - Nx
Install nx globally to invoke the command directly using nx , or use npx nx , yarn nx , or pnpm nx ....
Read more >Run tests | WebStorm Documentation - JetBrains
If you don't know why a test fails, you can debug it. In the editor, click the gutter on the line where you...
Read more >Setting Up A DevOps Pipeline With Nx - Christian Lüdemann
Nx will test your application and cache the result of the test. If you run the same command again, the results will be...
Read more >Testing Nrwl Nx Angular Monorepo Projects using JEST
To debug tests using Chrome Devtools or an IDE you can run the test command through node's --inspect-brk flag. Below script to run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is be design. Different projects in the repo can use different test runners, different configurations etc, so there is no way for us to run all of them in the same process.
npx nx run-many --all --target=test
is the way to do it. You can also run them in parallel, as follows:npx nx run-many --all --target=test --parallel
The default script
"test": "nx test",
from the rootpackage.json
should then probably be changed tonx run-many --all --target=test
.