Description
When an attempt is made to merge block-level granularity (isBlockCoverage = true
) and function level granularity (isBlockCoverage = false
), the two types of coverage are incompatible resulting in coverage that claims to have hit unreachable lines of code:
☝️ this is the Node.js test suite run on OSX, therefore code after isWindows
should not be hit, the reason it's reported that the lines are hit 3 times, is that Node.js outputs a report with function level granularity that indicates that realpathSync
is executed ...
this is probably due to the fact that fs.js
is used during the Node.js bootstrapping process, before the inspector has block-level coverage enabled.
Solution
block level coverage should take precedence over function level coverage as soon as it's observed.