GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — fix(compiler-cli): ignore generated ngDevMode signal branch for code coverage by dgp1130 · Pull Request #67339 · angular/angular Conversation
Contributor
The Angular compiler unconditionally adds a debug name transform for signals which generates a conditional on This commit adds a synthetic In conversation with Gemini, I believe Fixes #64583
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…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 angular#64583
|
There was an error while loading. Please reload this page.
|
For vitest this is indeed enough as |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This PR was merged into the repository. The changes were merged into the following branches: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Inaccurate code coverage with aot testing
There was an error while loading. Please reload this page.