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

Function callsFrom

__tests__/extraction.test.ts:11909–11913  ·  view source on GitHub ↗
(result: ReturnType<typeof extractFromSource>, fromId: string | undefined)

Source from the content-addressed store, hash-verified

11907
11908 describe('Calls in tag expressions outside <cfscript>/<cfquery> (#2091)', () => {
11909 const callsFrom = (result: ReturnType<typeof extractFromSource>, fromId: string | undefined) =>
11910 result.unresolvedReferences
11911 .filter((r) => r.fromNodeId === fromId && (r.referenceKind === 'calls' || r.referenceKind === 'instantiates'))
11912 .map((r) => `${r.referenceKind === 'instantiates' ? 'new ' : ''}${r.referenceName}@${r.line}`)
11913 .sort();
11914
11915 it('should extract calls in <cfset>, <cfif>, <cfelseif> and <cfreturn>, attributed to the enclosing method', () => {
11916 const code = `<cfcomponent>

Callers 1

extraction.test.tsFile · 0.70

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected