1
0
Fork 0
blog/src/components/templates/Archive.test.tsx

24 lines
566 B
TypeScript
Raw Normal View History

2019-11-24 14:29:25 +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__/posts.json'
2023-01-29 22:58:19 +01:00
import Archive from './Archive'
2019-11-24 14:29:25 +01:00
2020-07-08 01:31:03 +02:00
describe('Archive', () => {
2019-11-24 14:29:25 +01:00
const pageContext = {
tag: 'hello',
slug: '/hello',
currentPageNumber: 2,
numPages: 20
}
it('renders without crashing', () => {
const { container } = render(
<Archive
data={data as unknown as Queries.ArchiveTemplateQuery}
pageContext={pageContext}
/>
2019-11-24 14:29:25 +01:00
)
expect(container.firstChild).toBeInTheDocument()
})
})