Skip to content

Discrepancy in Function Coverage Between Istanbul and ReportGenerator Using Same lcov.info #737

Closed
@andreamangion

Description

@andreamangion

Summary

I'm generating test coverage using Jest (Istanbul) and outputting an lcov.info file. When I open this file in Istanbul's HTML report (and online viewers like lcov-viewer.netlify.app), I get function coverage of 73%.

However, when I feed the same lcov.info into ReportGenerator, it shows 95% function coverage. Line and branch coverage match exactly across all tools. The function coverage is significantly higher only in ReportGenerator.

Steps to Reproduce

  • Generate test coverage via Jest
  • Use coverageReporters: ["lcovonly", "html", "json-summary"]
  • Feed lcov.info into ReportGenerator
  • Compare function coverage with Istanbul HTML and JSON summary

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions