Alan 068bb4001d docs: add deprecation and pr note
Docs are deprecated in favor of the the new pages in AIO which are WIP.
2019-01-09 09:14:13 -08:00

2.8 KiB

Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see here.

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.

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

Options

prod

--prod

Flag to set configuration to "prod".

configuration

--configuration (alias: -c)

Specify the configuration to use.

main

--main

The name of the main entry-point file.

ts-config

--ts-config

The name of the TypeScript configuration file.

karma-config

--karma-config

The name of the Karma configuration file.

polyfills

--polyfills

The name of the polyfills file.

environment

--environment

Defines the build environment.

source-map

--source-map

Output sourcemaps.

progress

--progress

Log progress to the console while building.

watch

--watch

Run build when files change.

poll

--poll

Enable and define the file watching poll time period in milliseconds.

preserve-symlinks

--preserve-symlinks

Do not use the real path when resolving modules.

browsers

--browsers

Override which browsers tests are run against.

code-coverage

--code-coverage

Output a code coverage report.