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

Wiki update for ng test

Open glendaviesnz opened this issue 8 years ago • 3 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request - documentation update to be precise

Area

- [x ] devkit

Versions

Current angular-cli wiki

Desired functionality

Angular cli < 6 allowed a custom karma conf file to be specified on the command line with --conf. This is replace in version 6 with --configuration, but this needs to point to an entry in angular.json, not the actual conf file. It would be useful to note this on the wiki https://github.com/angular/angular-cli/wiki/test. Suggested text for this is:

<details>
  <summary>configuration</summary>
  <p>
    <code>--configuration</code> (alias: <code>-c</code>)
  </p>
  <p>
    Specify the configuration to use. This needs to point to an entry in a configuration section added to the 'test' section in the angular.json file, not the actual karma.conf file, eg.
    <code>
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "configurations": {
            "build": {
                "karmaConfig": "./karma.custom.conf.js"
            }
          }
        }
    </code>
  </p>
  <p>The run  <code>ng test --configuration=build</p>
</details>

glendaviesnz avatar Jul 03 '18 00:07 glendaviesnz

Hi @glendaviesnz

There seems to be a new command line option to specify the Karma configuration file: --karma-config . For example

ng test --karma-config=./src/circle-karma.conf.ts

cheers Charlie

CharlesSuttie avatar Jul 14 '18 07:07 CharlesSuttie

Documentation for ng test can now be found https://angular.io/cli/test

alan-agius4 avatar Oct 29 '18 11:10 alan-agius4

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.