I tried inject-loader with Typescript and Istanbul coverage.
For the code:
import getFoo from 'getFoo';
The inject-loader adds a logical or-expression. The result looks like:
var getFoo_1 = __getInjection("getFoo") || __webpack_require__(2);
If the depedency is mocked in all tests and the actual module is never used, the right side of the or-expression is never executed. This results in an uncovered branch in the coverage report.
I tried inject-loader with Typescript and Istanbul coverage.
For the code:
The inject-loader adds a logical or-expression. The result looks like:
If the depedency is mocked in all tests and the actual module is never used, the right side of the or-expression is never executed. This results in an uncovered branch in the coverage report.