MCPcopy Create free account
hub / github.com/callstack/agent-device / waitFor

Function waitFor

src/daemon/__tests__/http-server-artifacts.test.ts:317–322  ·  view source on GitHub ↗
(condition: () => boolean)

Source from the content-addressed store, hash-verified

315});
316
317async function waitFor(condition: () => boolean): Promise<void> {
318 for (let attempt = 0; attempt < 20; attempt++) {
319 if (condition()) return;
320 await new Promise((resolve) => setTimeout(resolve, 10));
321 }
322}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…