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

Function growFile

__tests__/liveness-watchdog-projects.test.ts:107–112  ·  view source on GitHub ↗

Grow `file` every 100ms for `forMs`.

(file: string, forMs: number)

Source from the content-addressed store, hash-verified

105
106/** Grow `file` every 100ms for `forMs`. */
107function growFile(file: string, forMs: number): Promise<void> {
108 return new Promise((resolve) => {
109 const iv = setInterval(() => { fs.appendFileSync(file, 'x'.repeat(64)); }, 100);
110 setTimeout(() => { clearInterval(iv); resolve(); }, forMs);
111 });
112}
113
114/** Spawned-process source: block the main thread for `ms`, then exit(5). */
115const block = (ms: number): string => `

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected