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

Function source

graph-ui/src/adr/AdrWorkspace.test.tsx:27–34  ·  view source on GitHub ↗
(initial = record())

Source from the content-addressed store, hash-verified

25});
26
27function source(initial = record()) {
28 let current = initial;
29 return {
30 adr: vi.fn(async (_project: string) => ({ ...current })),
31 saveAdr: vi.fn(async (_project: string, content: string) => { current = record(content); }),
32 replace(next: AdrRecord) { current = next; },
33 };
34}
35async function render(api: AdrWorkspaceProps['source'], overrides: Partial<AdrWorkspaceProps> = {}) {
36 await act(async () => root.render(<AdrWorkspace project={project} active source={api} {...overrides} />));
37}

Callers 1

Calls 1

recordFunction · 0.70

Tested by

no test coverage detected