Angular CLI 6未知选项:“-singleRun" [英] Angular CLI 6 Unknown option: '--singleRun'
问题描述
当我想执行测试时,我曾经激活过-single-run
选项,但是升级到Angular 6之后,它不再被识别.
When I want to execute my tests, I used to have the option --single-run
activated, but after upgrading to Angular 6 it is not recognized anymore.
> ng test --source-map=false --single-run --no-progress --browsers=ChromeNoSandbox
未知选项:-singleRun"
Unknown option: '--singleRun'
Angular CLI 6中--single-run的等效选项是什么?
What is the equivalent option in Angular CLI 6 for --single-run ?
推荐答案
使用较旧版本的angular-cli,您曾经能够同时使用-singleRun
和-watch= false
用于同一件事.现在他们删除了-singleRun
.
With older versions of angular-cli, you used to be able to use both --singleRun
and --watch=false
for the same thing. Now they removed --singleRun
.
您仍然可以使用 ng test --watch = false
在通过Karma执行构建后,将执行测试,并且它将自动监视文件中的更改.您可以通过--watch = false或--single-run一次运行测试.
Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes. You can run tests a single time via --watch=false or --single-run.
在通过Karma执行构建后,将执行测试,并且它将自动监视文件中的更改.您可以通过--watch = false一次运行测试.
Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes. You can run tests a single time via --watch=false.
这篇关于Angular CLI 6未知选项:“-singleRun"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!