Skip to content

feat(@angular/build): add code coverage reporters option for unit-test #30464

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
Jun 5, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Jun 4, 2025

The experimental unit-test builder now contains an additional option named codeCoverageReporters that supports configuring the reporter(s) for code coverage results. This options only has an effect if the codeCoverage option is also enabled. The codeCoverageReporters is an array with elements that can be either a string or a tuple of a string and options object. The later form supports customizing individual reporters. The options object fields are not validated by the builder schema. This option currently only is used by the vitest runner.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Jun 4, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Jun 4, 2025
@clydin clydin force-pushed the unit-test/coverage-reporters branch from 1fb95b9 to e4b894e Compare June 4, 2025 22:55
@clydin clydin marked this pull request as ready for review June 4, 2025 22:56
The experimental `unit-test` builder now contains an additional option
named `codeCoverageReporters` that supports configuring the reporter(s)
for code coverage results. This options only has an effect if the `codeCoverage`
option is also enabled.  The `codeCoverageReporters` is an array with
elements that can be either a string or a tuple of a string and options
object. The later form supports customizing individual reporters. The
options object fields are not validated by the builder schema.
This option currently only is used by the `vitest` runner.
Currently supported values for a coverage reporter are:
"html", "lcov", "lcovonly", "text", "text-summary", "cobertura"
@clydin clydin force-pushed the unit-test/coverage-reporters branch from e4b894e to 47cbd7e Compare June 5, 2025 13:11
@clydin clydin requested a review from alan-agius4 June 5, 2025 13:15
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Jun 5, 2025
@clydin clydin merged commit 1159cf0 into angular:main Jun 5, 2025
31 checks passed
@clydin clydin deleted the unit-test/coverage-reporters branch June 5, 2025 13:31
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants