MCPcopy Create free account
hub / github.com/EvoMap/evolver / makeStore

Function makeStore

test/lifecycleLastUpdateAck.test.js:54–63  ·  view source on GitHub ↗
({ nodeId = 'node_aaaaaaaaaaaa' } = {})

Source from the content-addressed store, hash-verified

52}
53
54function makeStore({ nodeId = 'node_aaaaaaaaaaaa' } = {}) {
55 const state = { node_id: nodeId };
56 return {
57 getState: (k) => (state[k] !== undefined ? state[k] : null),
58 setState: (k, v) => { state[k] = v; },
59 countPending: () => 0,
60 writeInbound: () => {},
61 writeInboundBatch: () => {},
62 };
63}
64
65function mockFetch(responseFactory) {
66 const calls = [];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected