600 failed calls of `FastAPI` parked under 'module:fastapi', and 600 of `get` under their name.
()
| 398 | |
| 399 | /** 600 failed calls of `FastAPI` parked under 'module:fastapi', and 600 of `get` under their name. */ |
| 400 | function fixture(): QueryBuilder { |
| 401 | db = DatabaseConnection.initialize(path.join(tempRoot(), 'test.db')); |
| 402 | const queries = new QueryBuilder(db.getDb()); |
| 403 | queries.insertNode({ id: 'f', kind: 'file', name: 'app.py', qualifiedName: 'app.py', filePath: 'app.py', |
| 404 | language: 'python', startLine: 1, endLine: 1, startColumn: 0, endColumn: 0, updatedAt: 0 }); |
| 405 | const refs = Array.from({ length: 1200 }, (_, i) => ({ |
| 406 | fromNodeId: 'f', referenceName: i < 600 ? 'FastAPI' : 'get', referenceKind: 'calls' as const, |
| 407 | line: i + 1, column: 0, filePath: 'app.py', language: 'python' as const, |
| 408 | })); |
| 409 | queries.insertUnresolvedRefsBatch(refs); |
| 410 | db.getDb().exec("UPDATE unresolved_refs SET status = 'failed', name_tail = CASE reference_name WHEN 'FastAPI' THEN 'module:fastapi' ELSE 'get' END"); |
| 411 | return queries; |
| 412 | } |
| 413 | |
| 414 | it('lets every importer of a package that appeared retry, and still skips a common name', () => { |
| 415 | const queries = fixture(); |
no test coverage detected