734382b5b3
* Moving to vitest * Rearranging test * Fixing prettier linting * Reverting launch.json * Adjustments * Merged with main and regenerated lockfile * Fixing tests for API * Yarn updated, docs is gone --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Alex van Andel <me@alexvanandel.com>
17 lines
381 B
TypeScript
17 lines
381 B
TypeScript
import type { PrismaClient } from "@prisma/client";
|
|
import { beforeEach, vi } from "vitest";
|
|
import { mockDeep, mockReset } from "vitest-mock-extended";
|
|
|
|
vi.mock("@calcom/prisma", () => ({
|
|
default: prisma,
|
|
availabilityUserSelect: vi.fn(),
|
|
userSelect: vi.fn(),
|
|
}));
|
|
|
|
beforeEach(() => {
|
|
mockReset(prisma);
|
|
});
|
|
|
|
const prisma = mockDeep<PrismaClient>();
|
|
export default prisma;
|