// A state of the runtime in memory, for the tests of the merge calls (calls.ts, partials.ts). export function memory() { const kv = new Map(); return { kv, st: { get: async (k: string) => (kv.has(k) ? { key: k, value: structuredClone(kv.get(k)), revision: 1 } : null), put: async (k: string, v: unknown) => { kv.set(k, structuredClone(v)); return 1; }, delete: async (k: string) => { kv.delete(k); }, keys: async () => [...kv.keys()].sort(), watch: async () => {}, } }; }