import { describe, it, expect, afterEach } from 'vitest' import { screen, cleanup, render } from '@testing-library/react' import { RouterProvider, createMemoryRouter } from 'react-router-dom' import ErrorPage from './ErrorPage' // Tests describe('Renders ErrorPage correctly', async () => { /** * Resets all renders after each test */ afterEach(() => { cleanup() }) /** * Passes - shows title correctly */ it('Should render the error page correctly', () => { const badRoute = '/some/bad/route' const router = createMemoryRouter([{ path: '/', element:
, errorElement: