didiercrunch13mo ago

In memory Deno Kv

Hi there, I am exploring with Deno Kv and it looks great! But my test are failing because I reuse the same database over and over. Is there a way to initialize an in memory version of Deno.Kv ? Something like sqlite in memory (https://www.sqlite.org/inmemorydb.html)?
4 Replies
didiercrunch13mo ago
I found my answer! I can simply use :memory: exactly as in sqlite! Amazing. Source: https://github.com/denoland/deno/blob/main/cli/tests/unit/kv_test.ts#L22
deno/kv_test.ts at main · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
Esente13mo ago
Thanks for this! I had to delete the SQLite file in my tests before knowing this!
didiercrunch13mo ago
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View