D
Deno

help

In memory Deno Kv

Ddidiercrunch6/9/2023
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)?
Ddidiercrunch6/9/2023
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.
EEsente6/9/2023
Thanks for this! I had to delete the SQLite file in my tests before knowing this!
Ddidiercrunch6/9/2023
😽
UUUnknown User6/9/2023
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!