Yaroslav Admin 4774049e84 feat(@angular/cli): disable progress when running outside TTY
The default value is changed from `true` to `progress.stdout.isTTY`. It
still has lower priority than value specified by command line flag or in
the .angular-cli.json config.

Fixes #8148
2017-11-21 11:51:53 -08:00

3.0 KiB

ng test

Overview

ng test compiles the application into an output directory

Running unit tests

ng test

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.

You can run tests with coverage via --code-coverage. The coverage report will be in the coverage/ directory.

Options

app

--app (aliases: -a) default value: 1st app

Specifies app name or index to use.

browsers

--browsers

Override which browsers tests are run against.

code-coverage

--code-coverage (aliases: -cc) default value: false

Coverage report will be in the coverage/ directory.

colors

--colors

Enable or disable colors in the output (reporters and logs).

config

--config (aliases: -c)

Use a specific config file. Defaults to the karma config file in `.angular-cli.json`.

environment

--environment (aliases: -e)

Defines the build environment.

log-level

--log-level

Level of logging.

poll

--poll

Enable and define the file watching poll time period (milliseconds).

port

--port

Port where the web server will be listening.

progress

--progress default value: true inside TTY, false otherwise

Log progress to the console while in progress.

reporters

--reporters

List of reporters to use.

single-run

--single-run (aliases: -sr)

Run tests a single time.

sourcemap

--sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps.

watch

--watch (aliases: -w)

Run build when files change.