1
0
Fork 0
blog/src/pages/__tests__/index.test.tsx

13 lines
397 B
TypeScript
Raw Normal View History

2021-03-01 01:06:23 +01:00
import React from 'react'
import { render } from '@testing-library/react'
2022-05-12 01:00:19 +02:00
import data from '../../../.jest/__fixtures__/home.json'
2023-01-29 22:58:19 +01:00
import Home from '../index'
2021-03-01 01:06:23 +01:00
describe('/', () => {
it('renders without crashing', () => {
// @ts-expect-error: only testing first render
const { container } = render(<Home data={data as any} />)
2021-03-01 01:06:23 +01:00
expect(container.firstChild).toBeInTheDocument()
})
})