2

Running a react redux app with typescript i get incorrect coverage results when running karma webpack with istanbul-remap for mapping back to typescript source code.

For example i added a change to a react unit test that makes the code not go into the mapStateToProps and mapDispatchToProps anymore (ignoring the redux flow). without using remap i get correct coverage decrease like so:

correct coverage decrease

with remap i get incorrect coverage result:

incorrect coverage result

radix
  • 795
  • 1
  • 5
  • 16

1 Answers1

0

After changing the webpack typescript loaders from

loaders: ['react-hot', 'ts-loader']

to:

 loader: 'ts-loader'

in the webpack test config file i got coverage

fixed coverage result

radix
  • 795
  • 1
  • 5
  • 16