Skip to content

Commit 3eb2a0e

Browse files
committed
test: add comprehensive database tests
1 parent bea8234 commit 3eb2a0e

2 files changed

Lines changed: 519 additions & 1 deletion

File tree

src/database/operations.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { ActionStatus, type ActionType, PrismaClient } from "../../generated/prisma/index.js";
22

3-
export const prisma = new PrismaClient();
3+
export let prisma = new PrismaClient();
4+
5+
// Allow tests to override the Prisma client
6+
export function setPrismaClient(client: PrismaClient) {
7+
prisma = client;
8+
}
49

510
// Connect to database and verify connection
611
export async function connectDatabase() {

0 commit comments

Comments
 (0)