8000 fix(@angular/build): exclude only source test files with unit-test vitest support by clydin · Pull Request #30343 · angular/angular-cli · GitHub
[go: up one dir, main page]

Skip to content

fix(@angular/build): exclude only source test files with unit-test vitest support #30343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025

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
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.

Vitest code coverage not properly reported
2 participants
0