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

Function growFile

__tests__/liveness-watchdog.test.ts:157–162  ·  view source on GitHub ↗

Grow `file` every 150ms for `forMs`; resolves when done.

(file: string, forMs: number)

Source from the content-addressed store, hash-verified

155
156 /** Grow `file` every 150ms for `forMs`; resolves when done. */
157 function growFile(file: string, forMs: number): Promise<void> {
158 return new Promise((resolve) => {
159 const iv = setInterval(() => { fs.appendFileSync(file, 'x'.repeat(64)); }, 150);
160 setTimeout(() => { clearInterval(iv); resolve(); }, forMs);
161 });
162 }
163
164 it('does NOT kill a blocked loop while the watched files advance (slow store, not a wedge)', async () => {
165 const tmp = progressFile();

Callers 1

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected