This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
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()
})
})