(cg: CodeGraph)
| 309 | // at the pool-idle boundary and (b) actually parks on a returned promise. |
| 310 | |
| 311 | async function seedPendingRefs(cg: CodeGraph): Promise<void> { |
| 312 | const raw = (cg as unknown as { db: DatabaseConnection }).db.getDb(); |
| 313 | const node = raw.prepare("SELECT id, file_path FROM nodes WHERE kind = 'function' LIMIT 1").get() as |
| 314 | | { id: string; file_path: string } |
| 315 | | undefined; |
| 316 | expect(node).toBeDefined(); |
| 317 | const ins = raw.prepare( |
| 318 | "INSERT INTO unresolved_refs (from_node_id, reference_name, reference_kind, line, col, file_path, language, status) VALUES (?, ?, 'calls', 1, 0, ?, 'typescript', 'pending')" |
| 319 | ); |
| 320 | ins.run(node!.id, 'helper0', node!.file_path); |
| 321 | ins.run(node!.id, 'helper1', node!.file_path); |
| 322 | } |
| 323 | |
| 324 | it('calls the backpressure hook once per settled batch', async () => { |
| 325 | writeFixtureProject(); |
no test coverage detected