Skip to content
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

fix(core): TestBed should still use the microtask queue to schedule effects #53843

Closed
wants to merge 2 commits into from

Commits on Jan 9, 2024

  1. fix(core): TestBed should still use the microtask queue to schedule e…

    …ffects
    
    Prior to this commit, `TestBed` would require tests call `flushEffects`
    or `fixture.detectChanges` in order to execute effects. In general, we
    want to discourage authoring tests like this because it makes the timing
    of change detection and effects differ from what happens in the
    application. Instead, developers should perform actions and `await` (or
    `flush`/`tick` when using `fakeAsync`) some `Promise` so that Angular
    can react to the changes in the same way that it does in the
    application.
    
    Note that this still _allows_ developers to flush effects synchronously
    with `flushEffects` and `detectChanges` but also enables the <action>,
    `await` pattern described above.
    atscott committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7a71f25 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Configuration menu
    Copy the full SHA
    caa30f7 View commit details
    Browse the repository at this point in the history