Skip to content

fakeAsync vs await isStable #2

Description

@hmil

Trying to figure out which is best between:

fakeAsync(() => { 
  fixture.detectChanges();
  flush();
});

and

async () => {
  await fixture.whenStable();
}

Initial tests seem to point to the former, but the later might be cleaner as it doesn't mess with time (and allows complex test scenarios where it is necessary to manipulate time).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions