(cg: CodeGraph, name: string, kind: string, filePath?: string)
| 3584 | return tmpDir; |
| 3585 | }; |
| 3586 | const callersOf = async (cg: CodeGraph, name: string, kind: string, filePath?: string) => { |
| 3587 | const target = (await cg.searchNodes(name, { limit: 20 })).find( |
| 3588 | (r) => r.node.kind === kind && r.node.name === name && (!filePath || r.node.filePath === filePath) |
| 3589 | ); |
| 3590 | expect(target).toBeDefined(); |
| 3591 | return (await cg.getCallers(target!.node.id)).map((c) => c.node.name).sort(); |
| 3592 | }; |
| 3593 | |
| 3594 | it('resolves same-file and imported calls to the literal member, never to the constant (#1573)', async () => { |
| 3595 | const tmpDir = setup({ |
no test coverage detected