aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/testUtils.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-01-02 15:16:48 +0200
committerGitHub <noreply@github.com>2025-01-02 15:16:48 +0200
commit39358b1517a06b90b9886a648ce1c595d1556c8e (patch)
tree60103dae88acaf549fb684b7cfc65f8c133a5bc4 /packages/trpc/testUtils.ts
parent3bcb1e10d3e97309ff8ede707dc5c3c057ba27ca (diff)
downloadkarakeep-39358b1517a06b90b9886a648ce1c595d1556c8e.tar.zst
ci: Run tests on push (#807)
* ci: Run tests on push * disable drizzle logging in tests * run db migrations in trpc tests
Diffstat (limited to 'packages/trpc/testUtils.ts')
-rw-r--r--packages/trpc/testUtils.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/trpc/testUtils.ts b/packages/trpc/testUtils.ts
index 23dcdb33..6d7e6dee 100644
--- a/packages/trpc/testUtils.ts
+++ b/packages/trpc/testUtils.ts
@@ -1,5 +1,6 @@
import { getInMemoryDB } from "@hoarder/db/drizzle";
import { users } from "@hoarder/db/schema";
+import { runQueueDBMigrations } from "@hoarder/shared/queues";
import { createCallerFactory } from "./index";
import { appRouter } from "./routers/_app";
@@ -54,6 +55,7 @@ export interface CustomTestContext {
export async function buildTestContext(
seedDB: boolean,
): Promise<CustomTestContext> {
+ runQueueDBMigrations();
const db = getTestDB();
let users: Awaited<ReturnType<typeof seedUsers>> = [];
if (seedDB) {