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

14 lines
398 B
TypeScript
Raw Normal View History

2021-03-01 01:06:23 +01:00
import React from 'react'
import { render } from '@testing-library/react'
import Home from '../index'
2022-05-12 01:00:19 +02:00
import data from '../../../.jest/__fixtures__/home.json'
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()
})
})