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

Function stopViewer

__tests__/cli-ui-command.test.ts:111–122  ·  view source on GitHub ↗
(child: ChildProcess)

Source from the content-addressed store, hash-verified

109}
110
111async function stopViewer(child: ChildProcess): Promise<void> {
112 if (child.exitCode !== null) return;
113 await new Promise<void>((resolve) => {
114 child.once('exit', () => resolve());
115 child.kill('SIGTERM');
116 // A viewer that ignores SIGTERM must not hang the suite.
117 setTimeout(() => {
118 child.kill('SIGKILL');
119 resolve();
120 }, 5_000).unref();
121 });
122}
123
124describe('codegraph ui — help', () => {
125 it('reads well and documents the flags', () => {

Callers 1

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected