import '@testing-library/jest-dom'
import {server} from "./mocks/server";
import mockRouter from 'next-router-mock'

jest.mock('next/router', () => jest.requireActual('next-router-mock'))

beforeAll(() => {
    server.listen()
})
beforeEach(() => {
    localStorage.clear();
    mockRouter.query = {}

})

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

afterAll(() => {
    server.close()
})