mirror of https://github.com/portainer/portainer
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
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());
|