bgotink / playwright-coverage

Track coverage in playwright tests
MIT License
35 stars 16 forks source link

Every line is marked as being covered #24

Open swissspidy opened 11 months ago

swissspidy commented 11 months ago

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

EmanueleMinotto commented 9 months ago

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

swissspidy commented 9 months ago

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