question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nx test --with-deps --codeCoverage isn't running code coverage for dependencies

See original GitHub issue

Current Behavior

if I run the following command, I expected the dependencies to be tested with code coverage, but it does not. Is there a way around this>

npx nx my-app --with-deps --codeCoverage

Expected Behavior

I expected the dependencies to be tested with code coverage

Steps to Reproduce

Failure Logs

Environment

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
craigbroadmancommented, Jan 17, 2022

I recently changed things over to target dependencies and had the same result.

The solution was to have “codeCoverage”: true in the test target options of the dependencies.

Thanks @wrightomated, I will take a look at this option

0reactions
github-actions[bot]commented, Jul 17, 2022

This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

nx run-many --target=test --coverage but exclude one project ...
in ProjectA's jest. config. js somehow works, but nx --coverage command still generate code coverage result 0/0. but it's waste of time to...
Read more >
@nrwl/jest | Nx
The recommended way to run/debug Jest tests via an editor ... Enable code coverage with the --coverage flag or by adding it to...
Read more >
Publishing Merged Code Coverage Report of Nx Workspace ...
Reviewing the code coverage result helps to identify code path(s) that are not covered by the tests. This information is important to improve...
Read more >
Code coverage with Bazel
Bazel features a coverage sub-command to produce code coverage reports on repositories that can be tested with bazel coverage . Due to the...
Read more >
Building an Angular Library with multiple entry points | Articles
Code Coverage. Angular supports code coverage out of the box by passing --no-watch --code-coverage to the ng test command.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found