Angular 6 – How to debug ‘[object ErrorEvent] thrown’ in Karma tests? What about ng test –single-run?

I was writing about the similiar problem in case of Angular v4 in the post named How to debug ‘NetworkError: Failed to execute ‘send’ on ‘XMLHttpRequest” in Karma tests.
With Angular v6 error message is little different but still does not provide useful message. With Angular v6 a solution of this problems is also slightly different.


The Solution is quite simple – the same I was writing about couple of months ago. We need to turn off source maps flag. Before, it could be done by adding –sourcemaps=false parameter, but now we need to use:

Next thing that surprised me was absence of CLI parameter –singleRun. Now we should use:

Please follow and like my blog: