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

Function assigns

__tests__/go-ref-qualifier.test.ts:402–405  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

400 const synced = await CodeGraph.init(dir, { index: true });
401 try {
402 const assigns = (): string[] => {
403 const ids = synced.getNodesInFile('auth/use.go').map((n) => n.id);
404 return synced.getOutgoingEdgesFrom(ids).filter((e) => e.line === 7).map((e) => synced.getNode(e.target)!.qualifiedName);
405 };
406 expect(assigns()).toEqual(['tokenJWT::assign']);
407 write('auth/use.go', use('_, _ = jwt.Parse("key", nil)'));
408 await synced.sync();

Callers 1

Calls 4

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

Tested by

no test coverage detected