unit tests with vitest, drizzle and d1
I am having problems running my hono API tests.
vites.config.ts
wrangler.toml
collections.test.ts
it is supposed to be using the local database inside .wrangler/state/v3/d1/miniflare-D1DatabaseObject/<SNIP>.sqlite since it is the one I have configured for local development and that works when I make requests with hoppscotch or any other client.1 Reply
I think it’s because wrangler is not running when using vitest. You can use super test it will run the test with the url provided so you can run the wrangler dev server and test it on it
Here’s and example