(cg: CodeGraph, name: string, kind: string, filePath?: string)
| 3499 | return tmpDir; |
| 3500 | }; |
| 3501 | const callersOf = async (cg: CodeGraph, name: string, kind: string, filePath?: string) => { |
| 3502 | const target = (await cg.searchNodes(name, { limit: 20 })).find( |
| 3503 | (r) => r.node.kind === kind && r.node.name === name && (!filePath || r.node.filePath === filePath) |
| 3504 | ); |
| 3505 | expect(target).toBeDefined(); |
| 3506 | return (await cg.getCallers(target!.node.id)).map((c) => c.node.name).sort(); |
| 3507 | }; |
| 3508 | |
| 3509 | it('resolves same-file and imported calls to the literal member, never to the constant (#1573)', async () => { |
| 3510 | const tmpDir = setup({ |
no test coverage detected