(name: string)
| 197 | |
| 198 | /** `<qualified name>@<file>:<line>` of what the function `name` calls. */ |
| 199 | const calls = (name: string): string[] => { |
| 200 | const caller = cg.getNodesByKind('function').find((n: Node) => n.qualifiedName === name)!; |
| 201 | expect(caller, name).toBeDefined(); |
| 202 | return cg.getCallees(caller.id).filter((r) => r.edge.kind === 'calls') |
| 203 | .map((r) => `${r.node.qualifiedName}@${path.basename(r.node.filePath)}:${r.node.startLine}`); |
| 204 | }; |
| 205 | |
| 206 | it('by the types of its arguments', () => { |
| 207 | expect(calls('pb::Parse32')).toEqual(['pb::ParseWithLimit@varint.cc:2']); |
no test coverage detected