angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng test Unknown option `--reporters`

Open Vaelor opened this issue 8 years ago • 10 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report
- [ ] feature request

Area

- [ ] devkit
- [ ] schematics
- [x] Don't know

Versions

$ ng --version

Angular CLI: 6.0.8
Node: 10.4.1
OS: linux x64
Angular: 6.0.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.6.8
@angular/cli                      6.0.8
@ngtools/json-schema              1.2.0
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.8
@schematics/update                0.6.8
ng-packagr                        2.4.1
rxjs                              6.2.1
typescript                        2.7.2
webpack                           4.8.3

Repro steps

Run ng test with the --reporters option. This worked on previous versions and is now gone.

The log given by the failure

Unknown option: '--reporters'

Desired functionality

At least a migration guide to what use instead - I have not found any info on the removal on the releases page (which serves as the changelog). Between releases this option was just removed: Diff for ng test wiki

Vaelor avatar Jun 26 '18 12:06 Vaelor

I believe that reports now need to be configured within your karma file.

Brocco avatar Jun 26 '18 17:06 Brocco

This issue in tandem with #11385 made my team unaware we've not been running unit tests in CI for some time.

mgol avatar Jun 27 '18 11:06 mgol

@Brocco It was nice to have for CI - just calling with a specific reporter thats easy to parse, while locally the one configured in karma was used (or a dev could use another installed reporter locally) Now this would mean to set up some kind of environment which I need to use in the karma config. I also couldn't find a hint on why it was removed.

Vaelor avatar Jun 27 '18 13:06 Vaelor

Would also like to know the deal with this..What is the correct way to do this now..? I would prefer to use it as it was, but still want to know what the intent is..?

KellyR-STCU avatar Jul 23 '18 23:07 KellyR-STCU

Yes, why mess with this? Is there some documentation on what to do now or why it was removed?

maccurt avatar Aug 03 '18 11:08 maccurt

Hopefully someone can answer this?

lundn avatar Aug 08 '18 13:08 lundn

I agree with @Vaelor, the --reporters feature was ideal for CI cases, please give it back, or at least address this missing feature.

TKul6 avatar Aug 12 '18 10:08 TKul6

Adding to the chorus. Would be much simpler to replace my progress and kjhtml runners with junit in the CI test run scenario via command line argument.

lsuarez5280 avatar Sep 27 '18 20:09 lsuarez5280

I also was using the --reporters options for running unit test in a CI environment. Got surprised it was removed.

musyokamuthangya avatar Nov 09 '18 08:11 musyokamuthangya

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.