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

Coverage always reports summary #7048

Closed
eddiemonge opened this issue Sep 26, 2018 · 2 comments · Fixed by #7058
Closed

Coverage always reports summary #7048

eddiemonge opened this issue Sep 26, 2018 · 2 comments · Fixed by #7058

Comments

@eddiemonge
Copy link
Contributor

eddiemonge commented Sep 26, 2018

🐛 Bug Report

Jest always reports coverage in results, regardless of what reporters are there. Seems to always append text-summary unless text is listed.

A basic summary was added here and then updated here.

I think this line should be coverageReporters.length < 1. That way if someone doesn't specify any reporter than the summary is used.

To Reproduce

Create a config and run it:

module.exports = {
  collectCoverage: true,
  coverageReporters: ['html']
}

Expected behavior

If I only put html in the reporters list, then nothing about coverage should be shown in the terminal

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
  Binaries:
    Node: 10.10.0 - ~/.nvm/versions/node/v10.10.0/bin/node
    npm: 6.4.1 - ~/.nvm/versions/node/v10.10.0/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0
@SimenB
Copy link
Member

SimenB commented Sep 27, 2018

Seems like a straight forward fix, wanna send a PR for it?

@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 May 12, 2021
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.

2 participants