MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / edge

Function edge

graph-ui/src/galaxy/graph-scope.test.ts:479–481  ·  view source on GitHub ↗
(node1: GraphNode, node2: GraphNode, node3: GraphNode)

Source from the content-addressed store, hash-verified

477 describe('the indexed calls at the edge of a scope', () => {
478 const degrees = (rows: [number, number, number][]) => page(rows.map(([id, calls_in, calls_out]) => ({ id: String(id), calls_in: String(calls_in), calls_out: String(calls_out) })));
479 const edge = (node1: GraphNode, node2: GraphNode, node3: GraphNode) => ({
480 data: { nodes: [node1, node2, node3], edges: [{ id: 1, source: 1, target: 2, type: 'CALLS' }, { id: 2, source: 1, target: 3, type: 'IMPORTS' }], total_nodes: 3 },
481 roots: new Set([1]), depth: 1, exhausted: false, frontier: [2, 3], levels: new Map([[1, 0], [2, 1], [3, 1]]) });
482
483 it('adds the calls into and out of the edge nodes and leaves out the ones already loaded', async () => {
484 const queryGraph = vi.fn<GraphQueryClient['queryGraph']>().mockResolvedValueOnce(degrees([[2, 5, 1], [3, 0, 4]]));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected