MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / waitUntil

Function waitUntil

__tests__/sync-synthesis-interval.test.ts:75–78  ·  view source on GitHub ↗
(check: () => boolean, timeoutMs: number)

Source from the content-addressed store, hash-verified

73}
74
75async function waitUntil(check: () => boolean, timeoutMs: number): Promise<void> {
76 const deadline = Date.now() + timeoutMs;
77 while (!check() && Date.now() < deadline) await sleep(50);
78}
79
80describe('CODEGRAPH_SYNTH_MIN_INTERVAL_MS holds a sync\'s synthesis (#2911)', () => {
81 let dir = '';

Callers 1

Calls 2

checkFunction · 0.70
sleepFunction · 0.70

Tested by

no test coverage detected