angularjstypescriptionic-frameworkkarma-jasmineremap-istanbul

configure remap-istanbul to include all source files


I am configuring my application developed on Ionic 2 with Angular 2 and TS to generate code coverage reports generated for my test files. I am using Jasmine , Karma and remap-istanbul for Unit Testing and generating coverage reports.

refering to this wonderful post: twofuckingdevelopers.com/2016/01/testing-angular-2-with-karma-and-jasmine/

However, I am not able to list out files that do not have a spec file written for them. Is there a way to include the same in istanbul reports and generate overall coverage accordingly.

Thank You!!!


Solution

  • In your Karma config file set the following option:

    coverageReporter: {
          includeAllSources: true
    }