From 48e1b29d5ecd66dca63eabff6d9b4045ba56dab1 Mon Sep 17 00:00:00 2001 From: Sahil Afrid Farookhi Date: Sun, 8 Feb 2026 01:28:42 -0600 Subject: [PATCH] ng-test: add page (#21037) --- pages/common/ng-test.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/ng-test.md diff --git a/pages/common/ng-test.md b/pages/common/ng-test.md new file mode 100644 index 0000000000..f5550aa21c --- /dev/null +++ b/pages/common/ng-test.md @@ -0,0 +1,33 @@ +# ng test + +> Run unit tests in a project. +> Note: Some commands might require additional packages such as Vitest. +> More information: . + +- Run unit tests: + +`ng {{[t|test]}}` + +- Run unit tests using a specific configuration: + +`ng {{[t|test]}} {{[-c|--configuration]}} {{development|production|...}}` + +- Specify the browsers to use for test execution: + +`ng {{[t|test]}} --browsers {{firefox|webkit|chromium}}` + +- Enable code coverage: + +`ng {{[t|test]}} --coverage` + +- Generate a coverage report in a specific format: + +`ng {{[t|test]}} --coverage --coverage-reporters {{cobertura|html|json|...}}` + +- Enable debug mode for tests: + +`ng {{[t|test]}} --debug` + +- List all discovered test files without building or running tests: + +`ng {{[t|test]}} --list-tests`