The repo was created using gulp-angular generator with es6/webpack. The generated code has an issue with karma/instanbul where it reports ONLY the entry webpack file as source file.
This repo provides a fix to this problem and allow to see the code coverage file by file.
Here are the steps that were done to sole the issue:
- Gulp unit test is completly replaced by npm test and npm test:watch scripts
- webpack configuration for karma.conf is added with isparta-loader for es6 support
- Add test entry file /src/app/tests.entry.js that import the main app file and use alternative karma-webpack
- Add webpack preprocessor for /src/app/tests.entry.js in karma.conf
Install and Run:
npm install
npm test
open coverage/Chrom*/index.html