ng test
Run unit tests in a project. Note: Some commands might require additional packages such as Vitest. More information: https://angular.dev/cli/test.
- Run unit tests:
ng
- Run unit tests using a specific configuration:
ng
- Specify the browsers to use for test execution:
ng --browsers
- Enable code coverage:
ng --coverage
- Generate a coverage report in a specific format:
ng --coverage --coverage-reporters
- Enable debug mode for tests:
ng --debug
- List all discovered test files without building or running tests:
ng --list-tests
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
