Skip to content

block and function level coverage are incompatible and should not be merged #2

Closed
@bcoe

Description

@bcoe

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:

screen shot 2019-01-19 at 9 51 22 pm

☝️ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions