Skip to content

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Aug 26, 2025

…TestBed error handler

The internal error handler in TestBed rethrows errors to prevent them from being silently ignored in tests. Prior to this commit, tests which used provideZoneChangeDetection in the providers would override the internal error handler of TestBed and prevent these errors from being rethrown.

@atscott atscott added target: major This PR is targeted for the next major release requires: TGP This PR requires a passing TGP before merging is allowed labels Aug 26, 2025
@pullapprove pullapprove bot removed the requires: TGP This PR requires a passing TGP before merging is allowed label Aug 26, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Aug 26, 2025
@pullapprove pullapprove bot removed the area: core Issues related to the framework runtime label Aug 26, 2025
@atscott atscott force-pushed the internalerrorhandlerprovider branch from 2d6d689 to 5054e2f Compare August 26, 2025 19:07
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Aug 26, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 26, 2025
@atscott atscott force-pushed the internalerrorhandlerprovider branch 6 times, most recently from 6b9e17c to d2f7f84 Compare August 27, 2025 20:26
@atscott atscott requested a review from JeanMeche August 27, 2025 20:52
…TestBed error handler

The internal error handler in TestBed rethrows errors to prevent them
from being silently ignored in tests. Prior to this commit, tests which
used `provideZoneChangeDetection` in the providers would override the
internal error handler of TestBed and prevent these errors from being
rethrown.

BREAKING CHANGE: (test only) - Using `provideZoneChangeDetection` in the
TestBed providers would previously prevent `TestBed` from rethrowing
errors as it should. Errors in the test will now be rethrown, regardless
of the usage of `provideZoneChangeDetection`. Tests should be adjusted to
prevent or account for these errors. As in previous major versions,
this behavior can be disabled with `rethrowApplicationErrors: false` in
`configureTestingModule` as a last resort.
@atscott atscott force-pushed the internalerrorhandlerprovider branch from d2f7f84 to 6720fb6 Compare August 28, 2025 14:17
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Aug 28, 2025
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Aug 29, 2025
@JeanMeche JeanMeche removed their request for review August 31, 2025 10:46
@mmalerba
Copy link
Contributor

mmalerba commented Sep 2, 2025

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

@mmalerba mmalerba closed this in d399d7d Sep 2, 2025
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: core Issues related to the framework runtime detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants