`file: qualified name` of every call edge out of a file.
(file: string)
| 82 | |
| 83 | /** `file: qualified name` of every call edge out of a file. */ |
| 84 | function callsFrom(file: string): string[] { |
| 85 | const ids = cg.getNodesInFile(file).map((n) => n.id); |
| 86 | return cg |
| 87 | .getOutgoingEdgesFrom(ids) |
| 88 | .filter((e) => e.kind === 'calls') |
| 89 | .map((e) => { |
| 90 | const t = cg.getNode(e.target)!; |
| 91 | return `${t.filePath}: ${t.qualifiedName}`; |
| 92 | }) |
| 93 | .sort(); |
| 94 | } |
| 95 | |
| 96 | describe('calls through CommonJS require bindings', () => { |
| 97 | it('follow `module.exports` through the root index to the exported function; an outside package is no edge', () => { |
no test coverage detected