()
| 42 | const git = (...args: string[]) => cp.execFileSync('git', args, { cwd: root, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }); |
| 43 | const write = (name: string, symbol: string) => fs.writeFileSync(path.join(root, name), `export function ${symbol}() { return 1; }\n`); |
| 44 | const commit = () => { git('add', '-A'); git('commit', '-m', 'change'); return git('rev-parse', 'HEAD').trim(); }; |
| 45 | const metadata = () => (cg as any).queries; |
| 46 | const symbols = (name: string) => cg.searchNodes(name).map(r => r.node.name); |
| 47 | const clean = () => expect(cg.getChangedFiles()).toEqual({ added: [], modified: [], removed: [] }); |
no test coverage detected