You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
anything else that you think might be relevant? { "jest.showCoverageOnLoad": true, "jest.coverageFormatter": "GutterFormatter" }
Operating system: Mac M1
Prerequisite
are you able to run jest test from the command line? yes
how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) jest
Steps to Reproduce
Try making a call to a function with multiple lines:
myFunctionCall(//this line shows as covered"foo",//this does not"bar");//this does not
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:
myFunctionCall();//shows as covered//empty line shows as covered - should not show gutter at allmyFunctionCall();//shows as covered
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:
"function with multiple lines": I tried it in our own repo but could not reproduce it. Do you have a sample repo we can look?
"empty lines show as covere": that was by design for the GutterFormatter, so it will appear as a continuous solid green bar. I can see valid points either way, therefore not sure there is a strong point to change the current behavior. Rest assured, it is not a bug per se.
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: