Skip to content

refactor(core): Pending effects should make the application unstable#53835

Closed
atscott wants to merge 1 commit intoangular:mainfrom
atscott:effectsStable
Closed

refactor(core): Pending effects should make the application unstable#53835
atscott wants to merge 1 commit intoangular:mainfrom
atscott:effectsStable

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Jan 8, 2024

In zone-full applications, this is already true because effects are scheduled inside a microtask and tracked by ZoneJS. When not using zones, this should stay consistent on principle and for testability reasons. A general pattern with zoneless testing will be to update state and await some promise (i.e. fixture.whenStable, which will be linked to ApplicationRef.isStable).

@atscott atscott force-pushed the effectsStable branch 3 times, most recently from 715d4bd to a35cd42 Compare January 30, 2024 17:28
@atscott atscott marked this pull request as ready for review January 30, 2024 20:33
@atscott atscott requested a review from alxhub January 30, 2024 20:33
@jessicajaniuk jessicajaniuk added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Jan 30, 2024
@ngbot ngbot bot added this to the Backlog milestone Jan 30, 2024
@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 23, 2024
@pkozlowski-opensource pkozlowski-opensource added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Feb 28, 2024
@pkozlowski-opensource
Copy link
Member

Looks like this one needs a rebase

@atscott atscott 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 Feb 29, 2024
@pkozlowski-opensource
Copy link
Member

Thnx for rebase @atscott! It seems like it trigger some legit test failures, though, so flipping it back to cleanup.

@pkozlowski-opensource pkozlowski-opensource added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Feb 29, 2024
In zone-full applications, this is already true because effects are
scheduled inside a microtask and tracked by ZoneJS. When not using
zones, this should stay consistent on principle and for testability
reasons. A general pattern with zoneless testing will be to update state
and `await` some promise (i.e. `fixture.whenStable`, which will be
linked to `ApplicationRef.isStable`).
@atscott atscott 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 Feb 29, 2024
@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 07173fd.

pkozlowski-opensource pushed a commit that referenced this pull request Mar 4, 2024
…53835)

In zone-full applications, this is already true because effects are
scheduled inside a microtask and tracked by ZoneJS. When not using
zones, this should stay consistent on principle and for testability
reasons. A general pattern with zoneless testing will be to update state
and `await` some promise (i.e. `fixture.whenStable`, which will be
linked to `ApplicationRef.isStable`).

PR Close #53835
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants