flush

From Get docs
< @angular/core‎ | testingAngular/docs/11/api/core/testing/flush


flush

function

Simulates the asynchronous passage of time for the timers in the fakeAsync zone by draining the macrotask queue until it is empty. The returned value is the milliseconds of time that would have been elapsed.

flush(maxTurns?: number): number

Parameters
maxTurns number Optional. Default is undefined.
Returns

number: The simulated time elapsed, in millis.


© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/api/core/testing/flush