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/__test__/ErrorPage.test.tsx

16 lines
459 B
TypeScript
Raw Normal View History

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