angular/packages/compiler-cli/src
Doug Parker 05d022d5e6 fix(compiler-cli): ignore generated ngDevMode signal branch for code coverage
The Angular compiler unconditionally adds a debug name transform for signals
which generates a conditional on `ngDevMode` (e.g., `ngDevMode ? { debugName: "xyz" } : []`).
During testing, `ngDevMode` is true, so the true branch executes but the
false branch is never executed. Consequently, coverage tools report the
false branch as an untested line/branch, preventing 100% test coverage.

This commit adds a synthetic `/* istanbul ignore next */` comment to the
generated false branch so that Istanbul ignores it. We only include the
istanbul comment (instead of additionally including c8) to focus on the
established standard for Angular CLI/Karma coverage while maintaining
compatibility with modern Vitest setups, since @vitest/coverage-v8 now
natively respects the fallback istanbul comment.

Fixes #64583

(cherry picked from commit dc4cf649b6)
2026-03-04 22:42:57 +00:00
..
bin refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
ngtsc fix(compiler-cli): ignore generated ngDevMode signal branch for code coverage 2026-03-04 22:42:57 +00:00
transformers refactor(compiler): remove preservePlaceholders (#58176) 2024-10-16 06:42:37 +00:00
extract_i18n.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
main.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
perform_compile.ts build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
perform_watch.ts refactor(common): Removes unused imports to clean up dependencies 2025-11-06 08:35:28 -08:00
typescript_support.ts feat(core): add support for TypeScript 6 2026-02-17 08:40:38 -08:00
version.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
version_helpers.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00