Hey guys, came here from the d1 channel. I've been curious about this since miniflare 3 came out. W

Hey guys, came here from the d1 channel.

I've been curious about this since miniflare 3 came out.
With those old miniflare 2 packages (https://www.npmjs.com/package/@miniflare/d1) when in a test environment, you could write code that would simulate d1 in the following way
import { D1Database, D1DatabaseAPI } from "@miniflare/d1";
import { drizzle } from "drizzle-orm/d1";

const d1 = new D1Database(new D1DatabaseAPI(sqliteDb));
const db = drizzle(d1); // now I can can write unit tests for drizzle

How can I write this with miniflare 3?
Was this page helpful?