Skip to content

fix(@angular/build): inject zone.js/testing before karma builder execution #30596

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 25, 2025

Conversation

lacolaco
Copy link
Contributor

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

unit-test builder doesn't inject zone.js/testing for Karma runner but only for Vitest.

Issue Number: #30595

What is the new behavior?

unit-test builder injects zone.js/testing for both of Karma and Vitest.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@lacolaco lacolaco force-pushed the fix-unit-test-polyfills branch from b16b911 to 6d9964f Compare June 25, 2025 03:46
@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 Jun 25, 2025
@alan-agius4 alan-agius4 linked an issue Jun 25, 2025 that may be closed by this pull request
1 task
…ution

`unit-test` builder doesn't inject `zone.js/testing` for `Karma` runner but only for `Vitest`.

Closes: angular#30595
@alan-agius4 alan-agius4 force-pushed the fix-unit-test-polyfills branch from 6d9964f to bdb11f6 Compare June 25, 2025 06:33
@alan-agius4 alan-agius4 removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jun 25, 2025
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Jun 25, 2025
@jkrems jkrems merged commit e0de868 into angular:main Jun 25, 2025
32 checks passed
@lacolaco lacolaco deleted the fix-unit-test-polyfills branch June 25, 2025 14:28
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: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[unit-test] karma runner doesn't support zone.js/testing auto injection
3 participants