Skip to content

makeFakeStorage

function makeFakeStorage(): DurableObjectStorage

Minimal in-memory DurableObjectStorage stub covering the KV subset of the interface: get, put, delete, and list.

No SQL support. This stub does NOT implement sql or any SQLite-backed methods. DOs that rely on state.storage.sql must use a real cloudflare:test binding (see do-storage.test.ts for the real-binding tier).

returns DurableObjectStorage

Learn: Test DOs in-process

Last updated: