Skip to content

Commit ed86b4f

Browse files
authored
Run repository test fix (#2302)
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 ed86b4f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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)