I have angular 2 webpack application, all webpack,karma configuration created as per angular.io webpack guide. I am not using aot. I am writing jasmine unit test spec to te
To find out what's really causing the error, disable source maps:
For angular-cli >= v6.x:
ng test --source-map=false
For angular-cli v1.x:
ng test -sm=false
You will then see a better error, e.g. "Cannot read property 'x' of undefined" in the actual source file that's causing the error. For some reason, there's a bug with sourcemaps right now in testing, and you just get this cryptic error.