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

docs: Add collectCoverage to Reference #8996

Merged
merged 4 commits into from Oct 17, 2019
Merged

Conversation

blzaugg
Copy link
Contributor

@blzaugg blzaugg commented Oct 1, 2019

Summary

Having been confused myself, as well as noting the same confusion in forums. Many people cannot figure out how to turn off coverage reports, if the option has been set via Configuration.

Note, a similar confusion/change apply to other boolean options as well, but that's not covered in this PR.

Test plan

n/a

Also noted how to override option set in Configuration
@jeysal
Copy link
Contributor

jeysal commented Oct 1, 2019

There's already a reference entry for --coverage with a reference to the collectCoverage alias, I think we should add the info there?

@blzaugg
Copy link
Contributor Author

blzaugg commented Oct 4, 2019

Is collectCoverage an alias of coverage or the other way around? In source it uses options.collectCoverage.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@fa0eb6d). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #8996   +/-   ##
========================================
  Coverage          ?   63.9%           
========================================
  Files             ?     277           
  Lines             ?   11652           
  Branches          ?    2860           
========================================
  Hits              ?    7446           
  Misses            ?    3576           
  Partials          ?     630

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa0eb6d...817195a. Read the comment docs.

@blzaugg
Copy link
Contributor Author

blzaugg commented Oct 4, 2019

I guess the args are coverage.

case 'coverage':
  options.collectCoverage = argv[key];

https://github.com/facebook/jest/blob/master/packages/jest-config/src/setFromArgv.ts#L21-L22

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah in the code it may be collectCoverage, but to users --coverage is definitely more comfortable to use and we should keep calling that the "default" I think

CHANGELOG.md Outdated Show resolved Hide resolved
@blzaugg
Copy link
Contributor Author

blzaugg commented Oct 17, 2019

Updated

@jeysal jeysal merged commit cc74b51 into jestjs:master Oct 17, 2019
@jeysal
Copy link
Contributor

jeysal commented Oct 17, 2019

Thanks!

@github-actions
Copy link

This pull request 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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants