playwright-coverage icon indicating copy to clipboard operation
playwright-coverage copied to clipboard

Every line is marked as being covered

Open swissspidy opened this issue 2 years ago • 4 comments

After first having issues with zero coverage, now I have basically the opposite problem of #5 — every line is marked as covered.

Once I solved issues like #23 and providing rewritePath to fix any path issues, I saw code coverage information trickling in. However, it turns out that for some reason every single line in every single file is marked as covered, even though that can't be true.

=============================== Coverage summary ===============================
Statements   : 100% ( 8717/8717 )
Branches     : 100% ( 0/0 )
Functions    : 100% ( 0/0 )
Lines        : 100% ( 8717/8717 )

This is not necessarily a bug in this package, but I am opening this issue here to get some help with figuring out the root cause and how to address it.

From what I can tell, source map extraction etc. works fine, so maybe it's an issue within convertToIstanbulCoverage?

My WIP code can be found here: https://github.com/swissspidy/media-experiments/pull/235

swissspidy avatar Dec 04 '23 15:12 swissspidy

I'm having the same problem, @swissspidy did you solve it?

EmanueleMinotto avatar Jan 31 '24 09:01 EmanueleMinotto

I ended up switching to monocart-reporter which worked like a charm to collect the coverage

swissspidy avatar Jan 31 '24 09:01 swissspidy