Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented May 19, 2025

When using the experimental unit-test builder with the vitest runner and code coverage, the automatic coverage excludes are now adjust to not include the bundled test files. This previously prevent accurate coverage analysis. Vite does this as a convenience but is problematic for the bundling strategy employed by the builder's test setup. To workaround this, the excludes are adjusted here to only automatically exclude the TypeScript source test files.

Closes #30333

…test support

When using the experimental unit-test builder with the vitest runner and code coverage,
the automatic coverage excludes are now adjust to not include the bundled test files.
This previously prevent accurate coverage analysis.
Vite does this as a convenience but is problematic for the bundling strategy employed by the
builder's test setup. To workaround this, the excludes are adjusted here to only automatically
exclude the TypeScript source test files.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label May 19, 2025
@clydin clydin linked an issue May 19, 2025 that may be closed by this pull request
1 task
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label May 19, 2025
@alan-agius4 alan-agius4 merged commit 87f4121 into angular:main May 19, 2025
32 of 33 checks passed
@alan-agius4
Copy link
Collaborator

The changes were merged into the following branches: main, 20.0.x

@clydin clydin deleted the unit-test/vitest-coverage-excludes branch May 19, 2025 17:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

Vitest code coverage not properly reported

2 participants