(cg: CodeGraph, name: string, kind: string, filePath?: string)
| 3478 | return tmpDir; |
| 3479 | }; |
| 3480 | const callersOf = async (cg: CodeGraph, name: string, kind: string, filePath?: string) => { |
| 3481 | const target = (await cg.searchNodes(name, { limit: 20 })).find( |
| 3482 | (r) => r.node.kind === kind && r.node.name === name && (!filePath || r.node.filePath === filePath) |
| 3483 | ); |
| 3484 | expect(target).toBeDefined(); |
| 3485 | return (await cg.getCallers(target!.node.id)).map((c) => c.node.name).sort(); |
| 3486 | }; |
| 3487 | |
| 3488 | it('resolves same-file and imported calls to the literal member, never to the constant (#1573)', async () => { |
| 3489 | const tmpDir = setup({ |
no test coverage detected