You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/setup-tests/setup-msw.ts

13 lines
363 B

import { server } from './server';
beforeAll(() =>
server.listen({
onUnhandledRequest: 'error',
})
);
// 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());