gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 785 forks source link

Uncovered Branches when generating ngrx effects #818

Open phillipzada opened 7 years ago

phillipzada commented 7 years ago

Hi all,

Been racking my brain for days on this one, can't seem to figure what branches are being missed/marked uncovered from this code

2017-06-21_11-39-41

Is there any suggestions on a fix, or is there a possible way to find out what branches Istanbul thinks I'm missing?

using angular-cli test, karma, karma-coverage-istanbul-reporter if that helps.

I think it has something to do with Observable as the ActionExtension class extends Observable, and its constructor was previously flagged uncovered code too when a type was set

export class ActionExtensions extends Observable<Action> {
 constructor( @Inject(Dispatcher) actionsSubject: any /*Observable<Action> Replaced with any due to Code Coverage Issue*/) {
phillipzada commented 7 years ago

It must be related to https://github.com/angular/angular-cli/issues/5526