coverage on decorated parameters is incorrect when `isolatedModules: true`
See original GitHub issueIssue :
Coverage on decorated parameters is incorrect when isolatedModules: true
Expected behavior :
Coverage on decorated parameters are correct when isolatedModules
option is not set.
If isolatedModules: true
, coverage is incorrect with branch not covered
.
Minimal repo :
https://github.com/hoonoh/jest-decorator-coverage/tree/master
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:14
Top Results From Across the Web
TSConfig Reference - Docs on every TSConfig option
undefined (default) provide suggestions as warnings to editors; true unreachable code is ignored; false raises compiler errors about unreachable code.
Read more >Can't run my Node.js Typescript project TypeError ...
When I try to start my app on Heroku I got the following stack trace. It is just a basic ts.app like you...
Read more >Understanding TypeScript Configuration Options
We will cover the following configuration options in the docs: ... When setting isolatedModules to true , TypeScript will warn you if you...
Read more >基于Typescript和Jest刷题环境搭建与使用
Interop Constraints */ // "isolatedModules": true, /* Ensure that each ... error messages // errorOnDeprecated: false, // Force coverage ...
Read more >inversify/InversifyJS - Gitter
It is not impossible to pass parameters to middleware(It is possible but only by ... If it is approved for development I will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve ended up with this workaround (similar to what @LoicMahieu has):
Ref: https://github.com/istanbuljs/istanbuljs/issues/70#issuecomment-778275926
We are facing the same issue, and this happens only when we’re using
The solutions provided in the comments (eg. this and this) do not seem to have any effect.
@micalevisk @vad3x these solutions do not seem to have an effect on my end.
Edit:
This is how I solved the issue, in an Angular app. I had to specifically add
/* istanbul ignore next */
before every single constructor parameter, and add/* istanbul ignore next */
before the constructor, too.