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

Function targets

__tests__/rust-self-owner.test.ts:17–24  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

15 cg = await CodeGraph.init(root, { index: true });
16}
17function targets(file: string) {
18 const caller = cg!.getNodesByKind('method').find(n => n.filePath === `src/${file}` && n.qualifiedName === 'Target::run');
19 expect(caller).toBeDefined();
20 return cg!.getOutgoingEdges(caller!.id).filter(e => e.kind === 'calls').map(e => {
21 const target = cg!.getNode(e.target)!;
22 return `${target.filePath}:${target.qualifiedName}`;
23 });
24}
25
26it('does not borrow a missing method from a same-named type in another module (#1861)', async () => {
27 await index({

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected