Skip to content

Support code-coverage instrumentation  #52

@cstickel

Description

@cstickel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions