mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
a581431bc8
- Fix to display apps with disabled health status on workspaces list - Migrate WorkspacesPage jest test into vitest - Modularize vitest setup into separate files: - setup/polyfills.ts: Blob, ResizeObserver polyfills - setup/domStubs.ts: Radix UI pointer capture stubs - setup/mocks.ts: useProxyLatency mock - setup/msw.ts: MSW server lifecycle Fixed #20319
12 lines
296 B
TypeScript
12 lines
296 B
TypeScript
import { server } from "testHelpers/server";
|
|
import { cleanup } from "@testing-library/react";
|
|
|
|
// MSW server lifecycle
|
|
beforeAll(() => server.listen({ onUnhandledRequest: "warn" }));
|
|
afterEach(() => {
|
|
cleanup();
|
|
server.resetHandlers();
|
|
vi.clearAllMocks();
|
|
});
|
|
afterAll(() => server.close());
|