Open janek37 opened 4 years ago
No reaction for 3 months :(
Can confirm this bug. nyc code coverage report was missing most of our TypeScript files. This was on the latest nyc release, ^15.1.0 and using the recommended TS setup.
As mentioned above, setting the version to 14.1.1 has resolved this for now.
I've noticed this too in a Next.js project. The fix was to install @istanbuljs/nyc-config-typescript"
and then add "extends": "@istanbuljs/nyc-config-typescript",
to .nycrc.json
.
Link to bug demonstration repository
https://github.com/janek37/nyc-testcase
Expected Behavior
Not ignore files that are not touched by tests.
Observed Behavior
Some files not touched by tests are ignored.
Troubleshooting steps
cache: false
in my nyc configIn the demo repo:
npm install
npm run coverage
Effect:
src/foo.ts
is ignored in coverage.nyc
version inpackage.json
to 14.1.1Effect:
src/foo.ts
is not ignored anymore.Environment Information