MCPcopy Create free account
hub / github.com/angular/angular / actAsync

Function actAsync

packages/private/testing/src/utils.ts:314–318  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

312 * ```
313 */
314export async function actAsync<T>(fn: () => T): Promise<T> {
315 const result = fn();
316 await TestBed.inject(ApplicationRef).whenStable();
317 return result;
318}
319
320/**
321 * Executes a function and flushes the Angular scheduler synchronously.

Callers 2

interop.spec.tsFile · 0.90

Calls 3

whenStableMethod · 0.65
injectMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected