ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

"No coverage for file" for projects with coverage #75

Closed markis closed 7 years ago

markis commented 7 years ago

I can use extension with the example project in this repo. But I cannot with my typescript projects that I use istanbul-remap. Here is an example project:

https://github.com/markis/strip-whitespace

Just clone that repo and run npm test then see that coverage gutters reports "No coverage for file" on my source files.

markis commented 7 years ago

Nevermind, it was related to windows bash. Windows bash outputs /mnt/c and vscode needs relative paths or C:\

ryanluker commented 7 years ago

hey @markis relative path resolution for the source files within the lcov is on by default in version 1.x of the extension so you shouldnt have had this issue... I did run the npm test on the project you specified by the info.lcov showed only the test file as having coverage? white-strip and if I did use the display command on the test.js file it did show the lcov coverage correctly white-string-1 You probably need to adjust istanbul to also provide coverage for the other files in that project. Hopefully this helps you.