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

Function edgesFrom

__tests__/java-outside-imports.test.ts:97–104  ·  view source on GitHub ↗

`kind qualified-name` of every non-structural edge out of a file.

(file: string)

Source from the content-addressed store, hash-verified

95
96/** `kind qualified-name` of every non-structural edge out of a file. */
97function edgesFrom(file: string): string[] {
98 const ids = cg.getNodesInFile(file).map((n) => n.id);
99 return cg
100 .getOutgoingEdgesFrom(ids)
101 .filter((e) => e.kind !== 'contains' && e.kind !== 'imports')
102 .map((e) => `${e.kind} ${cg.getNode(e.target)!.qualifiedName}`)
103 .sort();
104}
105
106describe('Java single-type and static imports from outside the project', () => {
107 it('own their names; the project’s own imports still resolve', () => {

Callers 1

Calls 4

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

Tested by

no test coverage detected