I am writing some unit tests for my component and i am getting this cryptic error message. I found a similar question at Angular 2 unit testing - getting error Failed to load
This is a problem with the Angular Cli
version 1.2.2 or newer. Run your test with --sourcemaps=false
and you will get the right error messages.
In Angular 4-5
ng test --sourcemaps=false
orng test -sm=false
In Angular 6+
ng test --source-map=false
See details here: https://github.com/angular/angular-cli/issues/7296