Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular CLI 6 Unknown option: '--singleRun'

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 ?

like image 988
mrkernelpanic Avatar asked Jun 12 '18 12:06

mrkernelpanic


2 Answers

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

Angular cli 1.x docs

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 docs

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.

like image 174
Bunyamin Coskuner Avatar answered Nov 04 '22 13:11

Bunyamin Coskuner


You should use ng test

ng test --watch=false
like image 30
Sajeetharan Avatar answered Nov 04 '22 13:11

Sajeetharan