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

Function generated

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

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

()

Source from the content-addressed store, hash-verified

421describe('an `export default` line inside a template literal', () => {
422 /** `file:name` of every node `generate` calls or instantiates. */
423 function generated(): string[] {
424 const generate = cg.getNodesInFile('src/gen/use.ts').find((n) => n.name === 'generate')!;
425 return cg
426 .getOutgoingEdges(generate.id)
427 .filter((e) => e.kind === 'calls' || e.kind === 'instantiates')
428 .map((e) => cg.getNode(e.target)!)
429 .map((n) => `${n.filePath}:${n.name}`)
430 .sort();
431 }
432
433 it('is text, so the real statement below it names the default', () => {
434 const targets = generated();

Callers 2

hubsFunction · 0.85

Calls 4

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

Tested by

no test coverage detected