2023-05-24 23:35:44 +00:00
|
|
|
import { beforeEach, vi } from "vitest";
|
|
|
|
import { mockDeep, mockReset } from "vitest-mock-extended";
|
|
|
|
|
2023-08-24 09:14:10 +00:00
|
|
|
import type { PrismaClient } from "@calcom/prisma";
|
|
|
|
|
2023-05-24 23:35:44 +00:00
|
|
|
vi.mock("@calcom/prisma", () => ({
|
|
|
|
default: prisma,
|
2023-09-06 19:23:53 +00:00
|
|
|
prisma,
|
2023-05-24 23:35:44 +00:00
|
|
|
availabilityUserSelect: vi.fn(),
|
|
|
|
userSelect: vi.fn(),
|
|
|
|
}));
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
mockReset(prisma);
|
|
|
|
});
|
|
|
|
|
|
|
|
const prisma = mockDeep<PrismaClient>();
|
|
|
|
export default prisma;
|