`file::qualifiedName` of every `kind` target of the symbol `name` in `file`.
(cg: CodeGraph, file: string, name: string, kind = 'calls')
| 78 | |
| 79 | /** `file::qualifiedName` of every `kind` target of the symbol `name` in `file`. */ |
| 80 | function targets(cg: CodeGraph, file: string, name: string, kind = 'calls'): string[] { |
| 81 | const fn = cg.getNodesInFile(file).find((n) => n.name === name); |
| 82 | expect(fn, `${name} in ${file}`).toBeDefined(); |
| 83 | return cg |
| 84 | .getOutgoingEdges(fn!.id) |
| 85 | .filter((e) => e.kind === kind) |
| 86 | .map((e) => cg.getNode(e.target)!) |
| 87 | .map((n) => `${n.filePath.replace(/\\/g, '/')}::${n.qualifiedName}`) |
| 88 | .sort(); |
| 89 | } |
| 90 | |
| 91 | describe('Go module in a subdirectory (#2322)', () => { |
| 92 | let cg: CodeGraph; |
no test coverage detected