| 13019 | const macro = result.nodes.find((n) => n.kind === 'constant' && n.name === 'LOG_AUDIT'); |
| 13020 | const doThing = result.nodes.find((n) => n.kind === 'function' && n.name === 'do_thing'); |
| 13021 | const refsFrom = (id?: string) => |
| 13022 | result.unresolvedReferences.filter((r) => r.fromNodeId === id).map((r) => `${r.referenceKind}:${r.referenceName}`); |
| 13023 | // The body's remote call belongs to the macro node — true exactly once. |
| 13024 | expect(refsFrom(macro?.id)).toContain('calls:audit_logger::log/2'); |
| 13025 | // The use site joins the call chain: do_thing -calls→ LOG_AUDIT. |