import '@testing-library/jest-dom';

import { afterAll, afterEach, beforeAll } from 'vitest';

import { resetRequestCounts, server } from './mocks/server.js';

beforeAll(() => server.listen({ onUnhandledRequest: 'error' }));

afterEach(() => {
  server.resetHandlers();
  resetRequestCounts();
});

afterAll(() => server.close());
