Files
portainer/app/setup-tests/setup-msw.ts
T
2024-01-23 08:42:52 +02:00

9 lines
322 B
TypeScript

import { server } from './server';
beforeAll(() => server.listen());
// if you need to add a handler after calling setupServer for some specific test
// this will remove that handler for the rest of them
// (which is important for test isolation):
afterEach(() => server.resetHandlers());
afterAll(() => server.close());