angular/packages/compiler-cli/test/ngtsc
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
..
doc_extraction build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
attach_source_location_spec.ts refactor(compiler): produce DOM-only instructions (#62096) 2025-06-23 14:24:09 +02:00
authoring_diagnostics_spec.ts feat(core): add support for TypeScript 6 2026-02-17 08:40:38 -08:00
authoring_inputs_spec.ts fix(compiler-cli): capture metadata for undecorated fields (#63957) 2025-10-09 14:02:16 -04:00
authoring_models_spec.ts fix(compiler-cli): capture metadata for undecorated fields (#63957) 2025-10-09 14:02:16 -04:00
authoring_outputs_spec.ts fix(compiler-cli): capture metadata for undecorated fields (#63957) 2025-10-09 14:02:16 -04:00
authoring_queries_spec.ts perf(compiler): chain query creation instructions 2025-12-09 09:24:36 -08:00
BUILD.bazel refactor(compiler-cli): allow the forms module to be loaded in tests 2025-11-05 17:35:43 +00:00
component_indexing_spec.ts build: migrate packages/compiler-cli to ts_project (#61826) 2025-06-03 11:41:52 +02:00
debug_transform_spec.ts fix(compiler-cli): ignore generated ngDevMode signal branch for code coverage 2026-03-04 22:42:57 +00:00
declaration_only_emission_spec.ts build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
defer_spec.ts refactor(compiler-cli): type check viewport trigger options (#64130) 2025-10-09 05:32:20 -07:00
env.ts feat(core): add support for TypeScript 6 2026-02-17 08:40:38 -08:00
extended_template_diagnostics_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
hmr_spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
host_bindings_type_check_spec.ts feat(compiler-cli): enable type checking of host bindings by default (#63654) 2025-09-09 14:34:29 -07:00
host_directives_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
imports_spec.ts build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
incremental_error_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_semantic_changes_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
incremental_spec.ts feat(core): add support for TypeScript 6 2026-02-17 08:40:38 -08:00
incremental_typecheck_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
local_compilation_spec.ts build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
ls_typecheck_helpers_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
monorepo_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
ngtsc_spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
scope_spec.ts refactor(compiler-cli): Migrate manually ngtsc tests to standalone by default (#58160) 2024-10-14 14:58:58 +00:00
selectorless_spec.ts build: update to the TypeScript 5.9 RC (#62815) 2025-07-25 13:39:12 +02:00
signal_forms_spec.ts refactor(forms): relax [formField] input type from FieldTree to Field 2026-02-11 11:45:20 -08:00
sourcemap_utils.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
standalone_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
template_mapping_spec.ts refactor: various build and import specificer fixes for strict deps (#63323) 2025-08-22 14:45:00 -07:00
template_typecheck_spec.ts fix(compiler-cli): detect uninvoked functions in defer trigger expressions 2026-02-20 16:57:08 +00:00
util.ts refactor(compiler-cli): convert scripts within packages/compiler-cli to relative imports (#60625) 2025-04-01 11:57:53 +00:00
xi18n_spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00