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 for empty lines and multiline statements show as green #1020
Comments
hi, regarding the 2 issues you mentioned:
|
Regarding the second issue. It throws me off when I open a file that has no or low coverage but a lot of the lines show as covered. I think I'd prefer no highlight over green, but I might change my mind if I actually saw it 🙂 What about continuing the color from the line above? That would provide the continuous solid green bar when code is covered and a solid red bar would make it more obvious when a big block of code isn't covered. |
Environment
vscode-jest version
: v5.2.3node -v
: v18.15.0npm -v
oryarn --version
: 9.5.0npm ls jest
ornpm ls react-scripts
(if you haven’t ejected):{ "watch": true, "onStartup": [ "all-tests" ] }
{ "jest.showCoverageOnLoad": true, "jest.coverageFormatter": "GutterFormatter" }
Prerequisite
npm run test
ornode_modules/.bin/jest
)jest
Steps to Reproduce
Try making a call to a function with multiple lines:
I would expect all those lines to show as covered.
In addition, empty lines show as covered as well. It would be nice if they were excluded and didn't have a gutter.
Example:
The problem with this is that it shows a lot of green and red next to each other. It would be much more useful if it didn't show any green (for empty lines) in the code that isn't covered.
The text was updated successfully, but these errors were encountered: