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

Function consumed

__tests__/default-export-declaration.test.ts:339–347  ·  view source on GitHub ↗

`file:name` of every node `consume` calls or instantiates.

()

Source from the content-addressed store, hash-verified

337
338/** `file:name` of every node `consume` calls or instantiates. */
339function consumed(): string[] {
340 const consume = cg.getNodesInFile('src/use.tsx').find((n) => n.name === 'consume')!;
341 return cg
342 .getOutgoingEdges(consume.id)
343 .filter((e) => e.kind === 'calls' || e.kind === 'instantiates')
344 .map((e) => cg.getNode(e.target)!)
345 .map((n) => `${n.filePath}:${n.name}`)
346 .sort();
347}
348
349describe('a default import of a module that exports something above its default', () => {
350 it('binds each data-router route to the page component, not its loader or action', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected