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

Function callsFrom

__tests__/cpp-test-translation-unit.test.ts:222–228  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

220
221/** `qualifiedName (file)` of every call the file's symbols make. */
222const callsFrom = (file: string): string[] => {
223 const ids = cg.getNodesInFile(file).map((n) => n.id);
224 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'calls').map((e) => {
225 const target = cg.getNode(e.target)!;
226 return `${target.qualifiedName} (${target.filePath})`;
227 });
228};
229
230describe('a C/C++ test links what its translation unit declares', () => {
231 it('passes over a test suite it does not include for the declaration it does', () => {

Calls 4

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

Tested by

no test coverage detected