test
ng testng tTakes the name of the project, as specified in the projects section of the angular.json workspace configuration file.
When a project name is not supplied, it will execute for all projects.
Arguments
projectThe name of the project to build. Can be an application or a library.
stringOptions
aotRun tests using Ahead of Time compilation.
booleanDefaultfalsebrowsersOverride which browsers tests are run against. Set to false to not use any browser.
stringcode-coverageOutput a code coverage report.
booleanDefaultfalsecode-coverage-excludeGlobs to exclude from code coverage.
arrayconfigurationcOne or more named builder configurations as a comma-separated list as specified in the "configurations" section in angular.json. The builder uses the named configurations to run the given target. For more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations.
stringdefineDefines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.
arrayexcludeGlobs of files to exclude, relative to the project root.
arrayexternal-dependenciesExclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.
arrayhelpShows a help message for this command in the console.
booleanincludeGlobs of files to include, relative to project root. There are 2 special cases:
- when a path to directory is provided, all spec files ending ".spec.@(ts|tsx)" will be included
- when a path to a file is provided, and a matching spec file exists it will be included instead.
arrayDefault**/*.spec.tsinline-style-languageThe stylesheet language to use for the application's inline component styles.
stringAllowed Valuescss, less, sass, scssDefaultcsskarma-configThe name of the Karma configuration file.
stringmainThe name of the main entry-point file.
stringpollEnable and define the file watching poll time period in milliseconds.
numberpolyfillsA list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.
arraypreserve-symlinksDo not use the real path when resolving modules. If unset then will default to true if NodeJS option --preserve-symlinks is set.
booleanprogressLog progress to the console while building.
booleanDefaulttruereportersKarma reporters to use. Directly passed to the karma runner.
arrayscriptsGlobal scripts to be included in the build.
arraysource-mapOutput source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.
booleanDefaulttruestylesGlobal styles to be included in the build.
arrayts-configThe name of the TypeScript configuration file.
stringwatchRe-run tests when source files change.
booleanDefaulttrueweb-worker-ts-configTypeScript configuration for Web Worker modules.
string