Skip to content

Commit 4870183

Browse files
committed
Run repository test fix
The normal database needs to be mocked because an import somewhere is using it which causes issues with the test container dbs and hanging at the end. Strategy copied from the trigger test file.
1 parent 9b0eb64 commit 4870183

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/webapp/test/runsRepository.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
import { describe, expect, vi } from "vitest";
2+
3+
// Mock the db prisma client
4+
vi.mock("~/db.server", () => ({
5+
prisma: {},
6+
$replica: {},
7+
}));
8+
19
import { containerTest } from "@internal/testcontainers";
210
import { setTimeout } from "node:timers/promises";
311
import { RunsRepository } from "~/services/runsRepository/runsRepository.server";

0 commit comments

Comments
 (0)