我遇到了一些奇怪的事情......
我在离子2应用程序中使用了Karma,Jasmine和Angular2。
我想做一些单元测试,并且我创建了一个总是成功的基本测试expect(true).toBe(true);
现在我想测试我的组件,但每当我import { MyComponent } from './myComponent';
时,我都会收到如下错误:
START:
Chrome 58.0.3029 (Linux 0.0.0) WARN: 'asmCrypto seems to be load from an insecure origin; this may cause to MitM-attack vulnerability. Consider using secure transport protocol.'
17 05 2017 22:41:28.303:WARN [reporter]: SourceMap position not found for trace: undefined
Chrome 58.0.3029 (Linux 0.0.0) ERROR
Uncaught TypeError: Cannot read property 'prototype' of undefined
at src/test.ts:168035
Finished in 1.318 secs / 0 secs @ 22:41:28 GMT+0200 (CEST)
SUMMARY:
✔ 0 tests completed
它可能与相对路径有关,因为我试图在node_modules中包含一个组件,终端返回了成功响应。
是否有人遇到此错误?