diff --git a/src/App.tsx b/src/App.tsx
index cd79907..7120c9d 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,11 +1,12 @@
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
-import { MainPage } from 'components/pages'
+import { ErrorPage, MainPage } from 'components/pages'
const router = createBrowserRouter([
{
path: '/',
element: ,
+ errorElement: ,
},
])
diff --git a/src/components/pages/ErrorPage/ErrorPage.test.tsx b/src/components/pages/ErrorPage/ErrorPage.test.tsx
new file mode 100644
index 0000000..d2ca2df
--- /dev/null
+++ b/src/components/pages/ErrorPage/ErrorPage.test.tsx
@@ -0,0 +1,28 @@
+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 router = createMemoryRouter([{ path: '/', element:
+
Oops!
+
Sorry, an unexpected error has occurred.
+ {isRouteErrorResponse(error) && (
+
+
+ {error.status} {error.statusText}
+
+
+ )}
+
+ )
+ }
+}
+
+export default ErrorPage
diff --git a/src/components/pages/ErrorPage/index.ts b/src/components/pages/ErrorPage/index.ts
new file mode 100644
index 0000000..333b56e
--- /dev/null
+++ b/src/components/pages/ErrorPage/index.ts
@@ -0,0 +1 @@
+export { default } from './ErrorPage'
diff --git a/src/components/pages/index.ts b/src/components/pages/index.ts
index 13c908d..74a0199 100644
--- a/src/components/pages/index.ts
+++ b/src/components/pages/index.ts
@@ -1 +1,3 @@
export { default as MainPage } from './MainPage'
+
+export { default as ErrorPage } from './ErrorPage'