Angular CLI: 6.0.3
Node: 8.11.1
OS: linux x64
Angular: 6.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/build-angular 0.6.3
@angular-devkit/build-optimizer 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@angular/cli 6.0.3
@ngtools/webpack 6.0.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.1.0
typescript 2.7.2
webpack 4.8.3
ng test --browser ChromeHeadless --code-coverage=true --single-run=trueUnknown option: '--browser'
Updated documentation
Fix --browser
I would like the command line to pick up a browser (e.g Chrome or ChromeHeadless) when running the tests.
Hi,
browser option has been renamed to browsers
ng t --help
usage: ng test <project> [options]
options:
--browsers
Override which browsers tests are run against.
--code-coverage
Output a code coverage report.
[...]
Try this: ng test --browsers=ChromeHeadless --code-coverage --single-run=true
@mboughaba thank you, this works for me! Looks like --single-run is no longer available. The current workaround for it is to use --watch=false. Linking #10711
I think at one point we accepted both browsers and browser as the same thing, and that got cleaned up in v6. Sorry for the confusion.
@filipesilva Please update the doc. https://github.com/angular/angular-cli/issues/11582
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Hi,
browser option has been renamed to browsers
Try this:
ng test --browsers=ChromeHeadless --code-coverage --single-run=true