MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / check

Function check

apps/vscode-e2e/src/suite/utils.ts:16–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 return Promise.race([
15 new Promise<void>((resolve) => {
16 const check = async () => {
17 const result = condition()
18 const isSatisfied = result instanceof Promise ? await result : result
19
20 if (isSatisfied) {
21 if (timeoutId) {
22 clearTimeout(timeoutId)
23 timeoutId = undefined
24 }
25
26 resolve()
27 } else {
28 setTimeout(check, interval)
29 }
30 }
31
32 check()
33 }),

Callers 1

waitForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected