compodoc: [BUG] Files missing in unit-test coverage (just like in #664)
Overview of the issue
Just like in #664, I am not able to view the unit test coverage table content. I tried to replace the \\ with /, but this didn’t help me.
Operating System, Node.js, npm, compodoc version(s)
Operating System: Windows 10 Node.js: v16.15.1 npm: 8.12.0 compodoc: 1.1.19
Angular configuration, a package.json file in the root folder
{
"name": "portfolio",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "mocha",
"coverage": "nyc npm run test",
"lint": "ng lint",
"compodoc": "npx compodoc -p tsconfig.app.json --unitTestCoverage coverage/portfolio/coverage-summary.json"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.3.0",
"@angular/common": "~13.3.0",
"@angular/compiler": "~13.3.0",
"@angular/core": "~13.3.0",
"@angular/forms": "~13.3.0",
"@angular/platform-browser": "~13.3.0",
"@angular/platform-browser-dynamic": "~13.3.0",
"@angular/router": "~13.3.0",
"lint-staged": "^13.0.1",
"mocha": "^10.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.1",
"@angular-eslint/builder": "13.2.1",
"@angular-eslint/eslint-plugin": "13.2.1",
"@angular-eslint/eslint-plugin-template": "13.2.1",
"@angular-eslint/schematics": "13.2.1",
"@angular-eslint/template-parser": "13.2.1",
"@angular/cli": "~13.3.1",
"@angular/compiler-cli": "~13.3.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.17.0",
"@typescript-eslint/parser": "5.17.0",
"coveralls": "^3.1.1",
"eslint": "^8.12.0",
"grunt-istanbul-coverage": "^0.1.4",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"nyc": "^15.1.0",
"typescript": "~4.6.2"
},
"lint-staged": {
"linters": {
"*.ts": [
"compodoc --coverageMinimumPerFile 25"
]
}
},
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"check-coverage": true
}
Compodoc installed globally or locally ?
globally
If possible sourcecode of the file where it breaks
I just ran npm run compodoc, I will provide my coverage-summary.json file which can help to resolve my issue.
{"total": {"lines":{"total":25,"covered":17,"skipped":0,"pct":68},"statements":{"total":35,"covered":26,"skipped":0,"pct":74.28},"functions":{"total":23,"covered":18,"skipped":0,"pct":78.26},"branches":{"total":2,"covered":0,"skipped":0,"pct":0},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\app.component.ts": {"lines":{"total":13,"covered":5,"skipped":0,"pct":38.46},"functions":{"total":6,"covered":1,"skipped":0,"pct":16.66},"statements":{"total":15,"covered":6,"skipped":0,"pct":40},"branches":{"total":2,"covered":0,"skipped":0,"pct":0}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\bookshelf\\bookshelf.component.ts": {"lines":{"total":5,"covered":5,"skipped":0,"pct":100},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"statements":{"total":6,"covered":6,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\hobbies\\hobbies.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\home\\home.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\navbar\\navbar.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\page-not-found\\page-not-found.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\portfolio\\portfolio.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\sitemap\\sitemap.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"G:\\GitHubCleanup\\SoftwareEngineeringPortfolio\\Portfolio\\src\\app\\writings\\writings.component.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
}
If possible your terminal logs before the error
No error logs.
Motivation for or Use Case
Uhh! I am not able to see the full unit code coverage table other than headers.
Reproduce the error
Related issues
Suggest a Fix
I believe is it all about my coverage-summary.json file. I even tried to replace all \\ with ‘/’, this change doesn’t helped me much and the issue is still persistent.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 4
- Comments: 15
Need a fix.
I am facing this exact issue.
I have the same problem too. It would be great to see a PR fixing it or a temporary workaround 🙂