test: move resetDb to own testing lib function

This commit is contained in:
2024-06-15 06:04:58 -04:00
parent 98d0be141e
commit fd61974740
4 changed files with 16 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
import { tables } from "~/models/schema";
import { getTestDb } from "./getTestDb";
export async function resetTestDb() {
const db = getTestDb();
for (const table of tables) {
await db.delete(table);
}
}