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

Function Harness

graph-ui/src/system/useSystemPoll.test.tsx:11–14  ·  view source on GitHub ↗
({ read, active = true, paused = false }: { read: () => Promise<number>; active?: boolean; paused?: boolean })

Source from the content-addressed store, hash-verified

9let visibility: DocumentVisibilityState;
10let mounted: boolean;
11function Harness({ read, active = true, paused = false }: { read: () => Promise<number>; active?: boolean; paused?: boolean }) {
12 const reading = useSystemPoll(read, active, paused, 100);
13 return <><output>{JSON.stringify(reading)}</output><button onClick={reading.refresh}>Refresh</button></>;
14}
15const state = () => JSON.parse(container.querySelector('output')?.textContent ?? '{}');
16const render = async (read: () => Promise<number>, active = true, paused = false) => {
17 await act(async () => { root.render(<Harness read={read} active={active} paused={paused} />); });

Callers

nothing calls this directly

Calls 1

useSystemPollFunction · 0.90

Tested by

no test coverage detected