-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add a setting for collecting coverage #330
Conversation
Pull Request Test Coverage Report for Build 393
💛 - Coveralls |
just to play devil's advocate, why do we want to force users to learn yet another coverage flag if they can already put it in their settings (like jest.pathToJest) or package.json script with |
One concrete use case would be if the default value of |
I like this idea a lot better, and I think it will probably give us more bang for the buck in the long run... But can you give us a little bit more background on what exactly the problem we are trying to solve with this PR? |
There's no problem with the current status, it would be just a simplification/enhancement. But maybe it would be better to continue the discussion in #226. |
oh i see, will do |
I prefer having folks configure Jest separate from configuring the UI. Jest has great documentation. If anything, I’d want to help change the config for users. |
In what direction would you then like #226 to go? |
I'm not sure @stephtr and while it's a good conversation to have I'd urge us to focus on our core functionality instead of the nice to have issues. While trying to fix a few regressions we've introduced in the last few weeks I seen all of these:
I'll skim #226 and give my two cents. |
Jest/#5836 enabled switching whether or not Jest should collect coverage information by a workspace attribute. This PR adds a setting to control that attribute.
Points to talk about:
null
, since supplyingfalse
would add the--no-coverage
flag.collectCoverage
isn'ttrue
, it therefore shows a warning message in that case. That behavior isn't perfect ifcollectCoverage
has been kept atnull
and the jest command/config has been modified to nevertheless collect the information.showCoverageOnLoad
, but without a warning message.An alternative would be that, additional to the
coverageCollect
switch, the setting could be temporarily overwritten when toggling the coverage overlay.By the way: Sorry that I accidentally pushed these commits to the master branch, that shouldn't have happened, but I had my local branch tracking upstream instead of origin.