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.
This commit is contained in:
Matt Aitken
2025-07-23 17:10:20 +01:00
committed by GitHub
parent 9b0eb64035
commit ed86b4f5db
+8
View File
@@ -1,3 +1,11 @@
import { describe, expect, vi } from "vitest";
// Mock the db prisma client
vi.mock("~/db.server", () => ({
prisma: {},
$replica: {},
}));
import { containerTest } from "@internal/testcontainers";
import { setTimeout } from "node:timers/promises";
import { RunsRepository } from "~/services/runsRepository/runsRepository.server";