Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Aug 27, 2025

The factory function for the reporter:angular--polyfills Karma plugin did not return a value, which violates Karma's plugin contract. This could cause Karma to crash when multiple reporters were in use, particularly with tools that use Karma's multi-reporter functionality.

This change modifies the factory to return an object with an empty adapters array ({ adapters: [] }). This satisfies Karma's plugin requirements and ensures compatibility with the multi-reporter, preventing the crash.

Fixes #31039

…a value

The factory function for the `reporter:angular--polyfills` Karma plugin did not return a value, which violates Karma's plugin contract. This could cause Karma to crash when multiple reporters were in use, particularly with tools that use Karma's multi-reporter functionality.

This change modifies the factory to return an object with an empty `adapters` array (`{ adapters: [] }`). This satisfies Karma's plugin requirements and ensures compatibility with the multi-reporter, preventing the crash.

Fixes angular#31039
@clydin clydin added the target: patch This PR is targeted for the next patch release label Aug 27, 2025
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Aug 27, 2025
@clydin clydin merged commit 4b49a20 into angular:main Aug 27, 2025
34 checks passed
@clydin
Copy link
Member Author

clydin commented Aug 27, 2025

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

@clydin clydin deleted the karma/multi-reporter-fix branch August 27, 2025 12:24
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.

Karma reporter:angular-polyfills factory does not return a reporter which breaks karma in some situations
2 participants