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

@@ -1,12 +1,12 @@
import { eq, sql } from "drizzle-orm";
import { eq } from "drizzle-orm";
import { DateTime } from "luxon";
import { beforeEach, describe, expect, it } from "bun:test";
import app from "~/index";
import { getTestDb } from "~/libs/test/getTestDb";
import { resetTestDb } from "~/libs/test/resetTestDb";
import { server } from "~/mocks";
import { resetDb } from "~/models/db";
import { deviceTokensTable } from "~/models/schema";
server.listen();
@@ -15,7 +15,7 @@ describe("requests the /token route", () => {
const db = getTestDb();
beforeEach(async () => {
await resetDb();
await resetTestDb();
});
it("should succeed", async () => {