Skip to content

How to generate full coverage data in out.json for all source files? #293

@WallaceChen123

Description

@WallaceChen123

I am using babel-plugin-istanbul to generate code coverage report, however, I found that the out.json file only includes the coverage data for tested source files as below:
"C:\path\to\file\a.ts": {
"path": "C:\path\to\file\a.ts",
"statementMap": {
"0": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 116
}
},
......skip other data......
}

the coverage data for un-tested source files is missing as below:
"C:/path/to/file/b.ts": {
"path": "C:/path/to/file/b.ts",
"statementMap": {},
"fnMap": {},
"branchMap": {},
"s": {},
"f": {},
"b": {}
},
Based on the out.json file, the generated coverage report only displays coverage for the tested source files and ignores un-tested source files, so the total coverage is incorrect.

May I know is there any method to generate all coverage data in out.json for all source files including tested and un-tested source files? Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions