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

Function targetsFrom

__tests__/framework-name-heuristic-scope.test.ts:53–57  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

51});
52
53const targetsFrom = (file: string) => {
54 const ids = cg.getNodesInFile(file).map((n) => n.id);
55 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'instantiates' || e.kind === 'calls' || e.kind === 'references')
56 .map((e) => cg.getNode(e.target)!).map((t) => `${t.filePath}:${t.qualifiedName}`);
57};
58
59describe('framework name heuristics', () => {
60 it('never pick a class declared inside another file’s function', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected