import type { DriveLike } from "@suaveplan/vault"; /** Minimal in-memory `DriveLike` for tests. */ export function createMemoryDrive(): DriveLike { const store = new Map(); return { async read(path) { const bytes = store.get(path); if (bytes === undefined) throw new Error(`memory-drive: missing path ${path}`); return bytes; }, async write(path, data) { store.set(path, data); }, async delete(path) { return store.delete(path); }, async exists(path) { return store.has(path); }, }; }