Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code coverage reporting breaks with multi-project runner + lerna and some Jest configurations #6506

Closed
DrewML opened this issue Jun 20, 2018 · 3 comments
Labels

Comments

@DrewML
Copy link

DrewML commented Jun 20, 2018

🐛 Bug Report

We recently found, after migrating multiple projects to a monorepo, that code coverage reporting can miss projects under test when Lerna is used and Jest is invoked with specific combinations of CLI flags.

To Reproduce

  1. Clone the repro repository
  2. Run npm install && npm run bootstrap
  3. Run npm run test:nocache, and note in stdout that project1/index.js and project2/index.js both have 100% coverage. This is the result of running the tests with the --no-cache flag
  4. Run npm run test:cache, and note in stdout we only see code coverage for 1 project. This is the result of running the tests with no flags
  5. Run npm run test:ohno, and note in stdout we only see code coverage for 1 project. This is the result of running the tests with --no-cache and -i

Expected behavior

Jest's code coverage reporting, when using the multi-project runner, should be identical, regardless of whether caching or run-in-band is enabled or disabled.

Link to repl or repo (highly encouraged)

https://github.com/DrewML/jest-coverage-bug-repro

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS Sierra 10.12.6
    CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 8.9.1 - ~/.nvm/versions/node/v8.9.1/bin/node
    Yarn: 1.6.0 - /usr/local/bin/yarn
    npm: 6.1.0 - ~/.nvm/versions/node/v8.9.1/bin/npm
  npmPackages:
    jest: ^23.1.0 => 23.1.0
@DrewML DrewML changed the title Code coverage reporting breaks with multi-project runner + lerna + caching Code coverage reporting breaks with multi-project runner + lerna and some Jest configurations Jun 20, 2018
nellh added a commit to OpenNeuroOrg/openneuro that referenced this issue Sep 27, 2018
@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant