(file: string, name: string)
| 97 | |
| 98 | /** The files of the functions named `take` that the function `name` in `file` calls. */ |
| 99 | const takes = (file: string, name: string): string[] => { |
| 100 | const caller = cg.getNodesInFile(file).find((n) => n.name === name && n.kind === 'function'); |
| 101 | expect(caller, `${file}:${name}`).toBeDefined(); |
| 102 | return cg.getOutgoingEdgesFrom([caller!.id]).filter((e) => e.kind === 'calls') |
| 103 | .map((e) => cg.getNode(e.target)!).filter((n) => n.name === 'take').map((n) => n.filePath).sort(); |
| 104 | }; |
| 105 | |
| 106 | describe('Rust `use` scopes at a call', () => { |
| 107 | it('lets a block\'s own use win where it is, and no further', () => { |
no test coverage detected