Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WallaceChen123 opened this issue Apr 17, 2024 · 0 comments
Open

Comments

@WallaceChen123
Copy link

WallaceChen123 commented Apr 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant