gpt4 book ai didi

angular - karma 测试运行器在完成后不关闭

转载 作者:行者123 更新时间:2023-12-05 03:22:43 26 4
gpt4 key购买 nike

我是第一次使用 Angular 测试,运行测试后,Karma 没有结束或关闭。

我假设它处于 watch 模式?因为它向我展示了成功等等。我该如何关闭它?我打算将代码推送到管道中;如果测试继续运行,管道将失败。

ng test --include='src/app/shared/components/primary-auto-complete/primary-auto-complete.component.spec.ts'
✔ Browser application bundle generation complete.
17 06 2022 14:32:01.027:WARN [karma]: No captured browser, open http://localhost:9876/
17 06 2022 14:32:01.319:INFO [karma-server]: Karma v6.3.19 server started at http://localhost:9876/
17 06 2022 14:32:01.320:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
17 06 2022 14:32:01.325:INFO [launcher]: Starting browser ChromeHeadless
17 06 2022 14:32:02.273:INFO [Chrome Headless 102.0.5005.115 (Windows 10)]: Connected on socket gY4oj1GnRzQj1pvnAAAB with id 59347942
Chrome Headless 102.0.5005.115 (Windows 10): Executed 1 of 1 SUCCESS (0.117 secs / 0.075 secs)
TOTAL: 1 SUCCESS

这就是卡住的地方。感谢您的帮助!

最佳答案

有一个 watch 标志。另外,您可能希望在管道中运行它时有额外的标志:

ng test --source-map=false --browsers=ChromeHeadless --watch=false

更多详情请见:

关于angular - karma 测试运行器在完成后不关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72656996/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com