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