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

Function targetFilesFrom

__tests__/express-heuristic-same-file.test.ts:51–54  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

49});
50
51const targetFilesFrom = (file: string) => {
52 const ids = cg.getNodesInFile(file).map((n) => n.id);
53 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind !== 'contains').map((e) => cg.getNode(e.target)!.filePath);
54};
55
56describe('Express name patterns', () => {
57 it('never reach another file’s declaration by name', () => {

Calls 4

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

Tested by

no test coverage detected