import { sql } from "drizzle-orm"; import { db } from "@/db"; /** Wipes every table between tests; identities restart at 1. */ export async function resetDb(): Promise { await db.execute( sql`TRUNCATE users, sessions, posts, tags, post_tags, pages, nav_items, settings, comments RESTART IDENTITY CASCADE`, ); }