Skip to content

fix(@angular/build): warn about unsupported options in the unit-test karma runner - #34546

Merged
alan-agius4 merged 3 commits into
angular:mainfrom
MeAkib:fix/karma-runner-unsupported-option-warnings
Oct 28, 2026
Merged

alan-agius4 merged 3 commits into
angular:mainfrom
MeAkib:fix/karma-runner-unsupported-option-warnings

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

The karma runner silently ignored providersFile, outputFile and coverageReporters. For example, ng test --runner karma --coverage --coverage-reporters lcov wrote no lcov.info and printed nothing. Log the same "not supported" warning that the runner already logs for its other unsupported options.

…karma runner

The karma runner silently ignored `providersFile`, `outputFile` and `coverageReporters`.
For example, `ng test --runner karma --coverage --coverage-reporters lcov` wrote no `lcov.info`
and printed nothing. Log the same "not supported" warning that the runner already logs for its
other unsupported options.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds warning logs to the Karma executor when unsupported options (providersFile, outputFile, and coverage.reporters) are provided, along with corresponding unit tests. The feedback correctly identifies a potential runtime TypeError where optional chaining should be used when checking coverage.reporters, as coverage itself may be undefined.

Comment thread packages/angular/build/src/builders/unit-test/runners/karma/executor.ts Outdated
…t-test karma runner

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread packages/angular/build/src/builders/unit-test/runners/karma/executor_spec.ts Outdated
@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Oct 28, 2026
@MeAkib
MeAkib requested a review from alan-agius4 October 28, 2026 08:42
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 28, 2026
@alan-agius4
alan-agius4 merged commit cd3d30c into angular:main Oct 28, 2026
40 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

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

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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants