cal.pub0.org/packages/ui/components/test-setup.ts

20 lines
414 B
TypeScript

import matchers from "@testing-library/jest-dom/matchers";
import { cleanup } from "@testing-library/react";
import { afterEach, expect, vi } from "vitest";
vi.mock("@calcom/lib/OgImages", async () => {
return {};
});
global.ResizeObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
disconnect: vi.fn(),
}));
expect.extend(matchers);
afterEach(() => {
cleanup();
});