fakeAsync
function
Wraps a function to be executed in the fakeAsync
zone:
- Microtasks are manually executed by calling
flushMicrotasks()
. - Timers are synchronous;
tick()
simulates the asynchronous passage of time.
API
Description
Usage Notes
function fakeAsync( fn: Function, options?: { flush?: boolean; }): (...args: any[]) => any;
Jump to details