ng test

Runs unit tests in a project.

ng test <project> [options]ng t <project> [options]



The name of the project to build. Can be an app or a library.



Override which browsers tests are run against.

--codeCoverage=true|false --codeCoverage|--noCodeCoverage

Output a code coverage report.


Globs to exclude from code coverage.


A named configuration environment, as specified in the "configurations" section of angular.json.


Defines the build environment.

--evalSourceMap=true|false --evalSourceMap|--noEvalSourceMap

Output in-file eval sourcemaps.


Shows a help message for this command in the console.


The name of the Karma configuration file.


The name of the main entry-point file.


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


The name of the polyfills file.

--preserveSymlinks=true|false --preserveSymlinks|--noPreserveSymlinks

Do not use the real path when resolving modules.

--prod=true|false --prod|--noProd

When true, sets the build configuration to the production environment. All builds make use of bundling and limited tree-shaking, A production build also runs limited dead code elimination using UglifyJS.

--progress=true|false --progress|--noProgress

Log progress to the console while building.


Karma reporters to use. Directly passed to the karma runner.

--sourceMap=true|false --sourceMap|--noSourceMap

Output sourcemaps.


The name of the TypeScript configuration file.

--vendorSourceMap=true|false --vendorSourceMap|--noVendorSourceMap

Resolve vendor packages sourcemaps.

--watch=true|false --watch|--noWatch

Run build when files change.