Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Oct 29, 2025

Previously, the unit test builder's coverage option was conditional. It was only defined if coverage: true was set, and it consolidated several top-level coverage* properties from the schema. This required downstream consumers, like the Karma and Vitest executors, to handle a potentially undefined object and led to complex and sometimes incorrect option merging, especially in the Vitest runner.

This commit refactors the option normalization logic to ensure the coverage object is always defined. A new enabled flag, controlled by the main coverage option, is now part of this object.

@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Oct 29, 2025
…nsistency

Previously, the unit test builder's `coverage` option was conditional. It was only defined if `coverage: true` was set, and it consolidated several top-level `coverage*` properties from the schema. This required downstream consumers, like the Karma and Vitest executors, to handle a potentially undefined object and led to complex and sometimes incorrect option merging, especially in the Vitest runner.

This commit refactors the option normalization logic to ensure the `coverage` object is *always* defined. A new `enabled` flag, controlled by the main `coverage` option, is now part of this object.
@clydin clydin force-pushed the unit-test/improve-coverage-merging branch from d585501 to 800a7eb Compare October 29, 2025 01:05
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 29, 2025
@clydin clydin requested a review from alan-agius4 October 29, 2025 10:57
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 29, 2025
@clydin clydin merged commit 4cb985c into angular:main Oct 29, 2025
57 of 58 checks passed
@clydin
Copy link
Member Author

clydin commented Oct 29, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the unit-test/improve-coverage-merging branch October 29, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants