ng测试在角度7中失败

时间:2019-11-26 10:19:51

标签: angular unit-testing http angular6

在角度7中进行ng test作为单元测试时出错:

  

断开连接(0次)客户端从CONNECTED状态断开(ping超时)   HeadlessChrome(Windows 10.0.0)错误         DisconnectedClient从CONNECTED状态断开(ping超时)     :连接在ID为22041751的_gbb-66VBafV3Tc8AAAB插座上       :适配器未报告规格总数。       应该创建HeadlessChrome(Windows 10.0.0)IntentService失败               错误:StaticInjectorError(DynamicTestModule)[AuthenticationGuard-> CredentialsService]:                 StaticInjectorError(平台:核心)[AuthenticationGuard-> CredentialsService]:                   NullInjectorError:没有CredentialsService的提供程序!               错误属性:Object({ngTempTokenPath:null,ngTokenPath:['AuthenticationGuard',Function]})                   在NullInjector.push ../ node_modules/@angular/core/fesm5/core.js.NullInjector.get(node_modules/@angular/core/fesm5/core.js:8896:1)                   在resolveToken(node_modules/@angular/core/fesm5/core.js:9141:1)                   在tryResolveToken(node_modules/@angular/core/fesm5/core.js:9085:1)                   在StaticInjector.push ../ node_modules/@angular/core/fesm5/core.js.StaticInjector.get(node_modules/@angular/core/fesm5/core.js:8982:1)                   在resolveToken(node_modules/@angular/core/fesm5/core.js:9141:1)                   在tryResolveToken(node_modules/@angular/core/fesm5/core.js:9085:1)                   在StaticInjector.push ../ node_modules/@angular/core/fesm5/core.js.StaticInjector.get(node_modules/@angular/core/fesm5/core.js:8982:1)                   在resolveNgModuleDep(node_modules/@angular/core/fesm5/core.js:21218:1)                   在NgModuleRef_.push ../ node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get(node_modules/@angular/core/fesm5/core.js:21907:1)                   在injectInjectorOnly(node_modules/@angular/core/fesm5/core.js:1774:1)

任何帮助表示赞赏!

0 个答案:

没有答案