运行ng test --browsers ChromeHeadless --watch=false
甚至使用非常基本的demo也会导致以下错误:
11% building modules 9/9 modules 0 active16 01 2019 18:14:39.497:INFO [karma-server]: Karma v3.1.4 server started at http://0.0.0.0:9876/
16 01 2019 18:14:39.499:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
16 01 2019 18:14:39.503:INFO [launcher]: Starting browser ChromeHeadless
16 01 2019 18:14:41.478:INFO [HeadlessChrome 66.0.3359 (Linux 0.0.0)]: Connected on socket uW1Q-TBQz0nv6rQXAAAA with id 81526540
HeadlessChrome 66.0.3359 (Linux 0.0.0): Executed 0 of 0 ERROR (0.008 secs / 0 secs)
与资源相关的所有已执行0个错误,共0个错误,但没有找到有效的方法。任何帮助将不胜感激:)
$ ng version
Angular CLI: 7.1.4
Node: 10.10.0
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.11.4
@angular-devkit/core 7.1.4
@angular-devkit/schematics 7.1.4
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
这确实是很奇怪的问题,似乎每个project or library
都需要一个测试条目。添加entry之后,此问题就消失了。尚未找到具体原因/文档。
B.T.W。我在库中遇到了相同的问题,并以相同的方式解决了它。