A fresh database holding one indexed file, `src/App.tsx`.
()
| 93 | |
| 94 | /** A fresh database holding one indexed file, `src/App.tsx`. */ |
| 95 | function freshDb(): void { |
| 96 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-synth-inputs-db-')); |
| 97 | roots.push(dir); |
| 98 | connection = DatabaseConnection.initialize(path.join(dir, 'test.db')); |
| 99 | queries = new QueryBuilder(connection.getDb()); |
| 100 | queries.upsertFile({ path: 'src/App.tsx', contentHash: 'h', language: 'tsx', size: 1, modifiedAt: 1, indexedAt: 1, nodeCount: 0, errors: [], generated: false } as never); |
| 101 | } |
| 102 | const recorded = (): string[] => |
| 103 | (connection.getDb().prepare('SELECT file_path FROM synthesis_inputs ORDER BY file_path').all() as Array<{ file_path: string }>).map((r) => r.file_path); |
| 104 |
no test coverage detected