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-08-29 15:29:41 +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;
|