-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): Update
ComponentFixture
behavior when using zoneles…
…s scheduler (#54024) When the zoneless scheduler is provided, we want to update the behavior of `ComponentFixture` to address common issues and painpoints in testing. Developers should never have to call `detectChanges` on a fixture manually. Instead of calling `detectChanges` after performing an action that updates state and requies a template refresh, developers should wait for change detection to run because the update needs to also have notified the scheduler. If this was not the case, the component would not work correctly in the application. Calling `detectChanges` to force an update could hide real bugs. This commit also updates the zoneless tests to uses `ComponentFixture` instead of manually attaching to the `ApplicationRef` and rewriting a lot of the helpers (`getDebugNode`, `isStable` as a value, `whenStable` as a Promise). PR Close #54024
- Loading branch information
1 parent
098543f
commit 3ca34e6
Showing
6 changed files
with
278 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.