Solvedangular cli Documentation should be explicit on what to use instead of ng test --reporters

With Angular 5, I was using ng test --reporters teamcity command, but it seems that --reporters option has been removed. How do we set the reporters from the command line now?

19 Answers

✔️Accepted Answer

Yes, fortunately we can use --karma-config option, however, it would be really great if we could still use the command-line --reporters arg, just like we did in previous versions of angular cli.

Other Answers:

Agreed, I don't want to have to maintain two different karma configs just to pick a different reporter in our CI build.

And where is this in the release notes? I can't find anywhere this info was broadcast, and it's kind of a big deal when all our CI builds silently stop publishing test results 😠

Just get back the --reporters command line arg, it was perfect for CI setups! There is no reason whatsoever to remove it!!!

For example, I do not need Cobertura reports during development but I need them in the CI.

This makes me sad. Why can't the solution be we will put it back? It was working just fine. I wanted a different report for my build than my local box. COME ON MAN!!!!!!

I agree with your concern about maintenance. I've had a go at writing another karma configuration file just for ci (I'm using Circleci). Repeating the contents of the original file was not difficult but I could not work out a way to import the existing configuration and then override the reporters, which was essentially the behavior of the command line flag when it was available. So one ends up with the same code in two places, which I don't like.

More Issues: