MCPcopy Create free account
hub / github.com/MirrowApp/mirrow / waitUntil

Function waitUntil

packages/cli/test/cli.test.js:23–32  ·  view source on GitHub ↗
(predicate, timeout = 2000, interval = 50)

Source from the content-addressed store, hash-verified

21}
22
23async function waitUntil(predicate, timeout = 2000, interval = 50) {
24 const start = Date.now();
25 while (Date.now() - start < timeout) {
26 if (await predicate()) {
27 return;
28 }
29 await delay(interval);
30 }
31 throw new Error("Timed out waiting for condition");
32}
33
34test("compiles a single Mirrow file and appends the .svg extension", async () => {
35 const root = await createTempDir("single");

Callers 1

cli.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected