MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / waitForFile

Function waitForFile

apps/cli/src/daemon.test.ts:58–65  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

56});
57
58const waitForFile = (path: string): Effect.Effect<boolean> =>
59 Effect.gen(function* () {
60 for (let attempt = 0; attempt < 40; attempt++) {
61 if (existsSync(path)) return true;
62 yield* Effect.promise(() => new Promise((resolve) => setTimeout(resolve, 50)));
63 }
64 return false;
65 });
66
67describe("spawnDetached", () => {
68 it.effect("can terminate the spawned detached process", () =>

Callers 1

daemon.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected