(name: string, line?: number)
| 375 | |
| 376 | /** `<qualified name>@<line>` of what the function or method `name` (at `line`, if given) calls. */ |
| 377 | const calls = (name: string, line?: number): string[] => { |
| 378 | const caller = [...cg.getNodesByKind('function'), ...cg.getNodesByKind('method')] |
| 379 | .find((n: Node) => n.qualifiedName === name && (line === undefined || n.startLine === line))!; |
| 380 | expect(caller, name).toBeDefined(); |
| 381 | return cg.getCallees(caller.id).filter((r) => r.edge.kind === 'calls').map((r) => `${r.node.qualifiedName}@${r.node.startLine}`); |
| 382 | }; |
| 383 | |
| 384 | it('the specialization the call writes the arguments of', () => { |
| 385 | expect(calls('pb::Read')).toEqual(['pb::WireFormatLite::ReadPrimitive@12']); |
no test coverage detected