feat(@angular/build): support Istanbul coverage in Vitest runner - #33029
Conversation
f3443aa to
0b4f325
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Istanbul coverage provider in the Vitest unit test runner, including automatic provider detection based on the target browser and installed dependencies. The review feedback identifies an opportunity to optimize browser detection logic using '.some()' for better performance and highlights several logic issues in the 'getBrowsersToCheck' function regarding CLI option priority and the handling of the 'enabled' property.
This change enables code coverage reporting when running tests in non-Chromium browsers (like Firefox or Safari) with the Vitest runner. The system now automatically detects the best coverage provider based on the configured browsers and installed packages: - If non-Chromium browsers are configured, it selects 'istanbul'. - If only Chromium browsers are used, it selects 'istanbul' if it is the only provider package installed. - Otherwise, it defaults to 'v8'. It also respects the provider specified in the user's custom Vitest configuration.
0b4f325 to
58ce827
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request 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 enables code coverage reporting when running tests in non-Chromium browsers (like Firefox or Safari) with the Vitest runner.
The system now automatically detects the best coverage provider based on the configured browsers and installed packages: