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(
|
2022-11-11 03:31:54 +01:00
|
|
|
<Archive
|
|
|
|
data={data as unknown as Queries.ArchiveTemplateQuery}
|
|
|
|
pageContext={pageContext}
|
|
|
|
/>
|
2019-11-24 14:29:25 +01:00
|
|
|
)
|
|
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
|
|
})
|
|
|
|
})
|