mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
|
||
|---|---|---|
| .. | ||
| GOLDEN_PARTIAL.js | ||
| mixed_model_types.js | ||
| mixed_model_types.ts | ||
| model_component_definition.js | ||
| model_component_definition.ts | ||
| model_directive_definition.js | ||
| model_directive_definition.ts | ||
| TEST_CASES.json | ||