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

Function runStatusJson

__tests__/status-json.test.ts:22–33  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

20).version as string;
21
22function runStatusJson(cwd: string): Record<string, unknown> {
23 const stdout = execFileSync(process.execPath, [BIN, 'status', '--json'], {
24 cwd,
25 encoding: 'utf-8',
26 env: { ...process.env, CODEGRAPH_NO_DAEMON: '1' },
27 stdio: ['ignore', 'pipe', 'pipe'],
28 });
29 // JSON mode prints exactly one line to stdout; be defensive about any stray
30 // leading output by parsing the last non-empty line.
31 const line = stdout.trim().split('\n').filter(Boolean).pop()!;
32 return JSON.parse(line);
33}
34
35describe('codegraph status --json — CI fields (#329)', () => {
36 let tempDir: string;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected