From 9bf5211f3d11dc00c2ed65d69f87e3ed78f0e8d5 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Sat, 3 Oct 2026 08:34:17 +0000 Subject: [PATCH 1/3] docs: document builder integration test targets in AGENTS.md --- AGENTS.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1e4c0c60d35f..e5f0b20cb168 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,12 +51,18 @@ This is the source code for the Angular CLI and related build tooling. This guid }); ``` - **NEVER** use or fallback to `os.tmpdir()`. Bazel executes tests in hermetic sandboxes and sets `TEST_TMPDIR` to an isolated, sandboxed directory. Using `os.tmpdir()` can cause sandboxing failures, permission errors, or file leakage outside the Bazel sandbox. -- **Unit Tests:** - - Run all unit tests: `pnpm bazel test //packages/...` - - Run a specific test target: `pnpm bazel test //packages/angular/build:test` +- **Unit & Integration Tests:** + - Run all unit and integration tests: `pnpm bazel test //packages/...` + - Run a specific unit test target: `pnpm bazel test //packages/angular/build:test` (note: this excludes builder integration tests under `src/builders/**/tests/**`). + - Run `@angular/build` builder integration test targets (for specs in `packages/angular/build/src/builders//tests/**`): + - `pnpm bazel test //packages/angular/build:application_integration_tests` + - `pnpm bazel test //packages/angular/build:dev-server_integration_tests` + - `pnpm bazel test //packages/angular/build:karma_integration_tests` + - `pnpm bazel test //packages/angular/build:library_integration_tests` + - `pnpm bazel test //packages/angular/build:unit-test_integration_tests` - Query test targets: `pnpm bazel query "tests(//packages/...)"` - Focus specific tests when debugging: use `fdescribe()` and `fit()`. NEVER commit focused tests to the repository. - - Run tests without sharding when isolating or debugging: use `--config=no-sharding` with a specific test target (e.g., `pnpm bazel test //packages/angular/build:test --config=no-sharding`). + - Run tests without sharding when isolating or debugging: use `--config=no-sharding` with a specific test target (e.g., `pnpm bazel test //packages/angular/build:library_integration_tests --config=no-sharding`). This disables test sharding (`--test_sharding_strategy=disabled`) and flaky test retries (`--flaky_test_attempts=1`). This is especially useful when isolating test runs or debugging with focused tests (`fit`/`fdescribe`) to avoid empty shard failures and unnecessary re-runs. Do not use this flag when running broad test suites (such as `//packages/...`), as executing tests without sharding takes significantly longer. From 1ff629a193e2cf4fec18090472b99dfe0a3b094a Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Sat, 3 Oct 2026 08:37:46 +0000 Subject: [PATCH 2/3] fixup! docs: document builder integration test targets in AGENTS.md --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index e5f0b20cb168..aaace2b97def 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ This is the source code for the Angular CLI and related build tooling. This guid - **NEVER** use or fallback to `os.tmpdir()`. Bazel executes tests in hermetic sandboxes and sets `TEST_TMPDIR` to an isolated, sandboxed directory. Using `os.tmpdir()` can cause sandboxing failures, permission errors, or file leakage outside the Bazel sandbox. - **Unit & Integration Tests:** - Run all unit and integration tests: `pnpm bazel test //packages/...` - - Run a specific unit test target: `pnpm bazel test //packages/angular/build:test` (note: this excludes builder integration tests under `src/builders/**/tests/**`). + - Run a specific unit test target: `pnpm bazel test //packages/angular/build:test` (note: this excludes builder integration tests under `packages/angular/build/src/builders/**/tests/**`). - Run `@angular/build` builder integration test targets (for specs in `packages/angular/build/src/builders//tests/**`): - `pnpm bazel test //packages/angular/build:application_integration_tests` - `pnpm bazel test //packages/angular/build:dev-server_integration_tests` From d9561f78a4e04dce2d7818b20b4d78c803056ca7 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Sat, 3 Oct 2026 08:39:13 +0000 Subject: [PATCH 3/3] fixup! docs: document builder integration test targets in AGENTS.md --- AGENTS.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index aaace2b97def..6c166865d9cc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,14 +53,10 @@ This is the source code for the Angular CLI and related build tooling. This guid - **NEVER** use or fallback to `os.tmpdir()`. Bazel executes tests in hermetic sandboxes and sets `TEST_TMPDIR` to an isolated, sandboxed directory. Using `os.tmpdir()` can cause sandboxing failures, permission errors, or file leakage outside the Bazel sandbox. - **Unit & Integration Tests:** - Run all unit and integration tests: `pnpm bazel test //packages/...` - - Run a specific unit test target: `pnpm bazel test //packages/angular/build:test` (note: this excludes builder integration tests under `packages/angular/build/src/builders/**/tests/**`). - - Run `@angular/build` builder integration test targets (for specs in `packages/angular/build/src/builders//tests/**`): - - `pnpm bazel test //packages/angular/build:application_integration_tests` - - `pnpm bazel test //packages/angular/build:dev-server_integration_tests` - - `pnpm bazel test //packages/angular/build:karma_integration_tests` - - `pnpm bazel test //packages/angular/build:library_integration_tests` - - `pnpm bazel test //packages/angular/build:unit-test_integration_tests` - - Query test targets: `pnpm bazel query "tests(//packages/...)"` + - Run a specific unit test target (e.g., `pnpm bazel test //packages/angular/build:test`). Note that package `:test` targets may exclude builder integration tests (such as specs under `**/builders/**/tests/**`). + - Run a specific builder integration test target (e.g., `pnpm bazel test //packages/angular/build:library_integration_tests` or `pnpm bazel test //packages/angular/build:application_integration_tests`). + - Query all test targets: `pnpm bazel query "tests(//packages/...)"` + - Find the exact test target for a specific spec file: `pnpm bazel query "kind(jasmine_test, rdeps(//packages/..., ))"` - Focus specific tests when debugging: use `fdescribe()` and `fit()`. NEVER commit focused tests to the repository. - Run tests without sharding when isolating or debugging: use `--config=no-sharding` with a specific test target (e.g., `pnpm bazel test //packages/angular/build:library_integration_tests --config=no-sharding`). This disables test sharding (`--test_sharding_strategy=disabled`) and flaky test retries (`--flaky_test_attempts=1`).