1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00
.profile/components/__test__/ErrorPage.test.tsx

16 lines
483 B
TypeScript
Raw Normal View History

2021-04-20 18:23:05 +02:00
import { render } from '@testing-library/react'
import { ErrorPage } from '../ErrorPage'
describe('<ErrorPage />', () => {
2021-12-04 15:52:51 +01:00
it('should render the message and statusCode', () => {
2021-04-20 18:23:05 +02:00
const messageContent = 'message content'
const statusCode = 404
const { getByText } = render(
<ErrorPage statusCode={statusCode} message={messageContent} />
)
expect(getByText(messageContent)).toBeInTheDocument()
expect(getByText(statusCode)).toBeInTheDocument()
})
})