(fn: string)
| 58 | const cg = await CodeGraph.init(root, { index: true }); |
| 59 | try { |
| 60 | const targets = (fn: string): string[] => { |
| 61 | const from = cg.getNodesByName(fn).filter((n) => n.kind === 'function'); |
| 62 | return cg |
| 63 | .getOutgoingEdgesFrom(from.map((n) => n.id), ['calls', 'references', 'instantiates']) |
| 64 | .map((e) => cg.getNode(e.target)!) |
| 65 | .map((n) => `${n.kind}:${n.qualifiedName}`); |
| 66 | }; |
| 67 | // Prelude `Some` / `Ok`, not the project's variants or structs. |
| 68 | expect(targets('find').filter((t) => /Some|Ok|Result/.test(t))).toEqual([]); |
| 69 | // `use EncodingMode::*` brings the variant in. |
no test coverage detected