An indexed project whose `.codegraph/` has `mode`, whatever the umask made it.
(mode: number)
| 127 | |
| 128 | /** An indexed project whose `.codegraph/` has `mode`, whatever the umask made it. */ |
| 129 | async function indexedProject(mode: number): Promise<string> { |
| 130 | const root = project(); |
| 131 | fs.writeFileSync( |
| 132 | path.join(root, 'orders.ts'), |
| 133 | 'export function placeOrder() { return chargeCard(); }\nexport function chargeCard() { return 1; }\n', |
| 134 | ); |
| 135 | const cg = await CodeGraph.init(root, { index: true }); |
| 136 | cg.close(); |
| 137 | fs.chmodSync(path.join(root, '.codegraph'), mode); |
| 138 | return root; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * The real daemon for `root`, from the built CLI, started the way a launcher |
no test coverage detected