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

Function source

graph-ui/src/system/SystemWorkspace.test.tsx:11–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9let root: Root;
10const processes = (unit = 'percent') => readProcesses({ self_pid: 42, self_rss_mb: 150.5, cpu_unit: unit, memory_kind: 'resident', self_memory_kind: 'peak_resident', processes: [{ pid: 42, cpu: 2.5, rss_mb: 120, elapsed: '01:00', command: 'codebase-memory-mcp', is_self: true }] });
11const source = (): SystemWorkspaceProps['api'] => ({
12 processes: vi.fn().mockResolvedValue(processes()),
13 logs: vi.fn().mockResolvedValue({ lines: ['level=INFO msg=ready', 'level=ERROR msg=Index_failed', '{"level":"warn","event":"slow"}'], total: 10 }),
14 indexJobs: vi.fn().mockResolvedValue([{ slot: 1, status: 'indexing', path: '/repo', error: '' }]),
15});
16const click = async (label: string) => {
17 const button = [...container.querySelectorAll('button')].find((entry) => entry.textContent === label);
18 expect(button).toBeDefined();

Callers 2

renderFunction · 0.70

Calls 1

processesFunction · 0.85

Tested by

no test coverage detected