Suggestion: Pass in tsconfig path (potentially not reading `typeCoverage` in package.json)
See original GitHub issueFirstly, great project! Iβm looking forward to using this within the organisation in which I work, and potentially contributing to the project too!
Sadly, I am having a little difficultly getting this working, hopefully you can help.
Describe the bug Our project structure is as follows:
package.json
src/
- app-component/app.ts ... etc
- tsconfig.app.json
If I run type-coverage
eg type-coverage --project src/tsconfig.app.json
, then I get the following result:
77636 / 88900 87.32%
type-coverage success.
If I add the following to package.json
, then I also get the result:
"typeCoverage": {
"project": "src/tsconfig.app.json"
}
result:
77636 / 88900 87.32%
type-coverage success.
However, when I run typescript-coverage-report
, (assuming itβll take the config from package.json as per https://github.com/alexcanessa/typescript-coverage-report#usage), then I get the following:
> typescript-coverage-report
βββββββββββββββββ¬ββββββββββββββββββββ¬ββββββββββββ¬ββββββββββββββ¬ββββββββββββββββ
β filenames (0) β percent (100.00%) β total (0) β covered (0) β uncovered (0) β
β --- β --- β --- β --- β --- β
βββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββ΄ββββββββββββββββ
View generated HTML Report at {project}/coverage-ts/index.html
To Reproduce See above for detailed info, happy to refine if needed.
Expected behaviour
Running typescript-coverage-report
should return back the same type coverage as the type-coverage
repo.
Screenshots N/a
Environment
- Tool version: 0.5.1 (type-coverage @2.17.2)
- OS: Mac
- Node version: v14.5.0
- Browser (if applicable): [e.g. chrome, safari]
Additional context N/a
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
AMAZING, Thanks so much @tomardern
Iβve created a Pull Request for this here - https://github.com/alexcanessa/typescript-coverage-report/pull/58