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
Unknown option: '--singleRun'
What is the equivalent option in Angular CLI 6 for --single-run ?
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
.
You can still use ng test --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 or --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.
你应该使用ng 测试
ng test --watch=false
Please refer to this issue and comment
https://github.com/angular/angular-cli/issues/10711#issuecomment-387704999
Starting from Angular v6, you don't need to specify --single-run
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.