(symbol: string, json = false)
| 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)); |
no test coverage detected