1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-24 18:26:17 +01:00
blog/jest/testRender.ts

13 lines
309 B
TypeScript
Raw Normal View History

2019-05-30 22:59:07 +02:00
import { render } from '@testing-library/react'
2019-10-02 13:35:50 +02:00
import { ReactElement } from 'react'
2019-05-02 21:11:52 +02:00
2019-10-02 13:35:50 +02:00
const testRender = (component: ReactElement) => {
2019-05-02 21:11:52 +02:00
it('renders without crashing', () => {
const { container } = render(component)
expect(container.firstChild).toBeInTheDocument()
})
}
export default testRender