2.7 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
.
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.