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

Function targetFilesFrom

__tests__/react-heuristic-same-file.test.ts:55–58  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

53});
54
55const targetFilesFrom = (file: string) => {
56 const ids = cg.getNodesInFile(file).map((n) => n.id);
57 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'calls').map((e) => cg.getNode(e.target)!.filePath);
58};
59
60describe('React name heuristics in JS/TS', () => {
61 it('never reach another file’s hook or context by name', () => {

Calls 4

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

Tested by

no test coverage detected