Every routine's calls, as `Caller->Callee`, and every node's qualified name, from the unit's extraction.
(code: string, file: string)
| 36 | |
| 37 | /** Every routine's calls, as `Caller->Callee`, and every node's qualified name, from the unit's extraction. */ |
| 38 | function extract(code: string, file: string): { calls: string[]; names: string[] } { |
| 39 | const result = extractFromSource(file, code); |
| 40 | const byId = new Map(result.nodes.map((n) => [n.id, n])); |
| 41 | return { |
| 42 | calls: result.unresolvedReferences |
| 43 | .filter((r) => r.referenceKind === 'calls') |
| 44 | .map((r) => `${byId.get(r.fromNodeId)?.name}->${r.referenceName}`), |
| 45 | names: result.nodes.map((n) => n.qualifiedName), |
| 46 | }; |
| 47 | } |
| 48 | |
| 49 | const OVERRIDES = `unit Marks; |
| 50 |
no test coverage detected