fix(@angular/build): validate V8 coverage support for browsers in Vitest - #32987
Conversation
1574491 to
f28dabb
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces validation to ensure that V8 code coverage is only enabled for supported Chromium-based browsers when using the Vitest runner, and adds an E2E test to verify this behavior. A review comment identifies that the current implementation only checks the instances property from CLI options, potentially bypassing validation for browsers configured via the name property or within vitest.config.ts. A code suggestion is provided to make the validation more robust by checking these additional configuration sources.
This change introduces a validation check in the Vitest runner to ensure that code coverage is only enabled when using supported Chromium-based browsers. Since the Angular CLI integration currently relies exclusively on the V8 coverage provider, running tests in non-Chromium browsers like Firefox or Safari with coverage enabled would result in incomplete data or missing reports. By adding this check, developers will receive a clear, actionable error message early in the process, preventing confusion and ensuring reliable coverage reports.
f28dabb to
dba32cf
Compare
|
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. |
This change introduces a validation check in the Vitest runner to ensure that code coverage is only enabled when using supported Chromium-based browsers. Since the Angular CLI integration currently relies exclusively on the V8 coverage provider, running tests in non-Chromium browsers like Firefox or Safari with coverage enabled would result in incomplete data or missing reports. By adding this check, developers will receive a clear, actionable error message early in the process, preventing confusion and ensuring reliable coverage reports.