Skip to content

Incorrect coverage reported with Node 20.10.0 #236

@Snafuh

Description

@Snafuh

Under Node >=20.10.0 Jest reports incorrect line coverage with the v8 coverage collector.

The issue was initially raised here jestjs/jest#14766 and here jestjs/jest#14764

The issue was further forwarded to the Node team here nodejs/node#51251 but it seems like Node does report the correct coverage.
There was a small change in the format of the V8 Coverage JSON, which might lead to the incorrect results in jest. Jest seems to use this package for v8 coverage, so I think the issue might originate here.

The difference in the coverage report for one of the reproductions was outline in this answer
nodejs/node#51251 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions