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

Function fixture

graph-ui/src/browser-ai/galaxy-context.test.ts:6–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5const node = (id: number, fields: Partial<GraphNode> = {}): GraphNode => ({ id, name: `node-${id}`, label: 'Function', x: 0, y: 0, z: 0, size: 1, color: '#fff', ...fields });
6function fixture(): GraphData {
7 return {
8 nodes: [node(1, { name: 'main', qualified_name: 'app.main', file_path: 'src/main.c', start_line: 8, end_line: 21, status: 'entry', in_calls: 0, out_calls: 2 }), node(2, { name: 'initialize' }), node(3, { name: 'caller' })],
9 edges: [{ source: 1, target: 2, type: 'CALLS' }, { source: 3, target: 1, type: 'CALLS' }, { source: 2, target: 3, type: 'IMPORTS' }],
10 total_nodes: 200,
11 };
12}
13function snapshot(graph: GraphData) {
14 const context = galaxyNodeContext(graph, 1, 'sample', 'snapshot');
15 expect(context, 'an existing selected node produces a context snapshot').toBeDefined();

Callers 1

Calls 1

nodeFunction · 0.70

Tested by

no test coverage detected