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

Function actAsync

packages/forms/signals/test/web/interop.spec.ts:1516–1522  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

1514}
1515
1516async function actAsync<T>(fn: () => T): Promise<T> {
1517 try {
1518 return fn();
1519 } finally {
1520 await TestBed.inject(ApplicationRef).whenStable();
1521 }
1522}
1523
1524/**
1525 * Replace with `Promise.withResolvers()` once it's available.

Callers 1

interop.spec.tsFile · 0.70

Calls 3

whenStableMethod · 0.65
injectMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected