fleet/frontend/test/test-setup.ts
2023-11-07 13:15:49 -08:00

17 lines
428 B
TypeScript

import "@testing-library/jest-dom";
import mockServer from "./mock-server";
// Needed for testing react-tooltip-5
window.CSS.supports = jest.fn();
global.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));
// Mock server setup
beforeAll(() => mockServer.listen());
afterEach(() => mockServer.resetHandlers());
afterAll(() => mockServer.close());