1
0
Fork 0
blog/.jest/testRender.ts

13 lines
315 B
TypeScript
Raw Normal View History

2019-10-02 13:35:50 +02:00
import { ReactElement } from 'react'
2023-01-29 22:58:19 +01:00
import { render } from '@testing-library/react'
2019-05-02 21:11:52 +02:00
2020-05-22 14:38:19 +02:00
const testRender = (component: ReactElement): void => {
2019-05-02 21:11:52 +02:00
it('renders without crashing', () => {
const { container } = render(component)
expect(container.firstChild).toBeInTheDocument()
})
}
export default testRender