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

Function cli

__tests__/cpp-macro-and-constructor-calls.test.ts:473–475  ·  view source on GitHub ↗
(symbol: string, json = false)

Source from the content-addressed store, hash-verified

471 const root = cg.getProjectRoot();
472 cg.close();
473 const cli = (symbol: string, json = false) => execFileSync(process.execPath,
474 [path.resolve(__dirname, '../dist/bin/codegraph.js'), 'callees', symbol, '-p', root, ...(json ? ['-j'] : [])],
475 { encoding: 'utf8', env: { ...process.env, CODEGRAPH_NO_WATCH: '1', CODEGRAPH_NO_DAEMON: '1', NO_COLOR: '1' } });
476 const aggregate = JSON.parse(cli('aggregate_initialization', true));
477 expect(aggregate.callees).toEqual([expect.objectContaining({ kind: 'struct', relationships: ['instantiates'] })]);
478 const constructed = JSON.parse(cli('constructor_braced', true));

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected