test: move resetDb to own testing lib function
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user