tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.82k stars 919 forks source link

karma-coverage-istanbul-reporter doesnot show any data for code coverage #405

Closed Sharique-Hasan closed 5 years ago

Sharique-Hasan commented 5 years ago

Minimal reproduction of the bug with instructions:

Clone the repo and run the tests.

Current behavior:

*Coverage summary* 
Statements   : Unknown% ( 0/0 )
Branches     : Unknown% ( 0/0 )
Functions    : Unknown% ( 0/0 )
Lines        : Unknown% ( 0/0 )

Running ng test --code-coverage gives out this error:

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[14].include: The provided value "\\src" is not an absolute path!

Expected behavior:

Coverage summary should show proper coverage of code.

Other information:

I would be willing to submit a PR to fix this issue:

[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

tomastrajan commented 5 years ago

Yes, this was added recently and doesn't really work, I suppose some version mismatch between CLi, karma and reporter, would you be interested in having a look into this ?

Sharique-Hasan commented 5 years ago

I updated the bug.

I did look into this with few quick tries and even tried karma-coverage but the summary was same. karma-coverage shows 100% for everything which is also wrong.

tomastrajan commented 5 years ago

Was fixed by this commit, coverage can be found here.