Angular 2 unit testing - getting error Failed to load 'ng:///DynamicTestModule/module.ngfactory.js'

前端 未结 10 2392
执念已碎
执念已碎 2020-12-23 11:04

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

10条回答
  •  清酒与你
    2020-12-23 11:43

    Adding on to Dan Field's answer

    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.

    ng test --sourcemaps=false

    shorthand for this is:

    ng test -sm=false

    See details here: https://github.com/angular/angular-cli/issues/7296

提交回复
热议问题