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

[Bug]: Unable to generate v8 coverage with Jest v28 for a monorepo #12904

Closed
coderunderatree opened this issue Jun 2, 2022 · 1 comment · Fixed by #12912
Closed

[Bug]: Unable to generate v8 coverage with Jest v28 for a monorepo #12904

coderunderatree opened this issue Jun 2, 2022 · 1 comment · Fixed by #12912

Comments

@coderunderatree
Copy link

coderunderatree commented Jun 2, 2022

Version

28.1.0

Steps to reproduce

Steps to reproduce the error:

  1. Clone my repo at https://github.com/l0h1t/jest_v28_monorepo_test
  2. yarn install
  3. yarn test
  4. coverage is reported as 0

Steps to reproduce the expected behaviour:

  1. checkout to branch v27
  2. yarn install
  3. yarn test
  4. coverage is reported correctly

Expected behavior

I want to see coverage generated properly with v8 coverage provider on jest v28

Actual behavior

I see 0 coverage with jest v28

Additional context

The coverage generation with v8 on jest v28 fails only when resetModules option is set to true in the jest config.

Environment

System:
  OS: macOS 12.4
  CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Binaries:
  Node: 12.20.0 - ~/Library/Caches/fnm_multishells/84414_1654190289679/bin/node
  Yarn: 1.22.18 - /usr/local/bin/yarn
  npm: 8.9.0 - ~/Library/Caches/fnm_multishells/84414_1654190289679/bin/npm
npmPackages:
  jest: ^28.1.0 => 28.1.0
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

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 Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant