2
2
mirror of https://github.com/Thream/website.git synced 2024-07-21 09:28:32 +02:00
website/components/ErrorPage/ErrorPage.test.tsx

16 lines
472 B
TypeScript
Raw Normal View History

2021-10-24 05:19:39 +02:00
import { render } from '@testing-library/react'
import { ErrorPage } from '.'
2021-10-24 05:19:39 +02:00
describe('<ErrorPage />', () => {
it('should render the message and statusCode', () => {
2021-10-24 05:48:06 +02:00
const messageContent = 'message content'
2021-10-24 05:19:39 +02:00
const statusCode = 404
const { getByText } = render(
2021-10-24 05:48:06 +02:00
<ErrorPage statusCode={statusCode} message={messageContent} />
2021-10-24 05:19:39 +02:00
)
2021-10-24 05:48:06 +02:00
expect(getByText(messageContent)).toBeInTheDocument()
2021-10-24 05:19:39 +02:00
expect(getByText(statusCode)).toBeInTheDocument()
})
})