mirror of
https://github.com/fleetdm/fleet
synced 2026-05-14 20:48:35 +00:00
relates to #23128 updates mock service worker package as it was using a version of `path-to-regexp` that had a high security vulnerability. This updated version of msw uses a newer version of the package that does not have this vulnerability I had to add the `jest-fixed-dom` package to update msw as well as update our version of typescript to 4.7
15 lines
427 B
TypeScript
15 lines
427 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());
|