Angular CLI 6未知选项:“-singleRun" [英] Angular CLI 6 Unknown option: '--singleRun'

查看:68
本文介绍了Angular CLI 6未知选项:“-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

Angular cli 1.x文档

在通过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.

Angular cli 6.x文档

在通过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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆