didiercrunch
didiercrunch•14mo 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
didiercrunch
didiercrunch•14mo 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
GitHub
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.
Esente
Esente•14mo ago
Thanks for this! I had to delete the SQLite file in my tests before knowing this!
didiercrunch
didiercrunch•14mo ago
😽
Unknown User
Unknown User•14mo ago
Message Not Public
Sign In & Join Server To View