Unit test coverage mapping with Webpack and Angular broken?

179 Views Asked by At

After spending hours to fix this issue - maybe somebody have an idea, why my coverage reports doesn't map correctly

enter image description here

I am using:

  • Angular 6
  • webpack 4
  • karma 3.0
  • karma-coverage-istanbul-reporter 2.0.4

If you guys have some ideas, i will post further config files.

1

There are 1 best solutions below

0
On

In my case the solution was simple. I got a hint if something like this happens, the reason is often, that the sourcemap files are not correct.

I run:

ng test --source-map=true

and it works!