2022-08-15 19:52:01 +00:00
|
|
|
import { PrismaClient } from "@prisma/client";
|
|
|
|
import { mockDeep, mockReset, DeepMockProxy } from "jest-mock-extended";
|
|
|
|
|
2023-01-11 17:33:34 +00:00
|
|
|
import * as CalendarManager from "@calcom/core/CalendarManager";
|
2022-08-15 19:52:01 +00:00
|
|
|
import prisma from "@calcom/prisma";
|
|
|
|
|
2023-01-11 17:33:34 +00:00
|
|
|
jest.mock("@calcom/core/CalendarManager");
|
|
|
|
|
2022-08-15 19:52:01 +00:00
|
|
|
jest.mock("@calcom/prisma", () => ({
|
|
|
|
__esModule: true,
|
|
|
|
default: mockDeep<PrismaClient>(),
|
|
|
|
}));
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
mockReset(prismaMock);
|
|
|
|
});
|
|
|
|
|
|
|
|
export const prismaMock = prisma as unknown as DeepMockProxy<PrismaClient>;
|
2023-01-11 17:33:34 +00:00
|
|
|
export const CalendarManagerMock = CalendarManager as unknown as DeepMockProxy<typeof CalendarManager>;
|