coverage-istanbul-loader icon indicating copy to clipboard operation
coverage-istanbul-loader copied to clipboard

Blank lines in code are creating growing offset for coverage in html reports

Open liqueurdetoile opened this issue 1 year ago • 0 comments

Hi,

I'm using coverage-istanbul-loader + karma-coverage-istanbul-reporter in a webpack + typescript + karma setup for tests (no Babel). All is working fine and coverage calculation is accurate. Thanks a lot for your work.

I'm only facing a minor, but quite annoying issue. When looking in html report, coverage informations are not at the same height that the related line in code. It appears that blank lines are ignored and each one add 1 line to the offset, that obviously grows wider and wider after many of those.

Here's a compared screenshot : https://imgur.com/a/QFdxQBw

Not really sure if it's related to your loader or to the reporter. I've checked available options in both but didn't find something relevant to fix this.

Any clue to solve this ?

Thanks !

liqueurdetoile avatar Apr 13 '23 12:04 liqueurdetoile