-
Notifications
You must be signed in to change notification settings - Fork 294
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 toggling #226
Comments
Brilliant. We'd love your help getting that implemented @smith. I'm happy to help point out the code that we'll want to change. It'd be great to have a second set of eyes on the coverage and process restarting code as well -- both have some changes on the go. |
In my opinion adding a new vscode setting (like |
jestjs/jest#5836 adds what I think is needed to implement this. |
I can see 2 coverage usage patterns:
In any case, I think the following logic should be able to cover both:
@stephtr do you see any problem with this logic? If users can run regular jest without modifying |
Assumed I'm a bit dissatisfied with the idea that for viewing coverage (including the CodeLens) one just needs to execute the By the way, my implementation of the setting actually just forwarded it to facebook/jest#5836. |
Here's my two cents ... @smith, nice work on the PR to alter @connectdotz, I'll second your two use cases. I think a quick pick menu would help us with the user interface to show the code coverage. We could bring it up from a keyboard command and/or a status bar item. That'd solve Nathan's use case pretty well. I don't understand what you're dissatisfied with @stephtr. What path configuration are we changing?
I understand that an extension setting to collect coverage could make it easier on the user initially but it's mixing concerns. Keep the Jest configuration where Jest wants it. If you're looking for where Jest is configured you've already go to check package.json, jest.config.js, and if there's a non-standard file in a My final concern, if we're going to get smart about checking the Jest configuration to see if coverage has been configured we're going to have to check standard and non-standard config files, and probably not support react-scripts very well. |
Should we pause the discussion until the more urgent issues are fixed? My dissatisfaction is with the idea that the user controls the We are already injecting quite a few settings into Jest, so the Runner isn't a new place for that. My plan would be that we aren't getting smart and don't check if coverage has been enabled but just inject it with Runner#L69 when necessary (e.g. when the current state of |
It would be nice to be able to toggle coverage checking (with
--coverage
/--no-coverage
.)Toggling the overlay is useful, but the slowest part of my test run is generating the coverage report. I'd like to be able to toggle this quickly to where I could normally leave it off but turn it back on when wanting to do coverage checking.
The text was updated successfully, but these errors were encountered: