MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / refsFrom

Function refsFrom

__tests__/extraction.test.ts:13021–13022  ·  view source on GitHub ↗
(id?: string)

Source from the content-addressed store, hash-verified

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.

Callers 1

extraction.test.tsFile · 0.70

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected