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

24 lines
568 B
TypeScript

import React from 'react'
import { render } from '@testing-library/react'
import Tags from '../tags'
describe('/tags', () => {
const data = {
allMarkdownRemark: {
group: [
{ fieldValue: 'android', totalCount: 2 },
{ fieldValue: 'aperture', totalCount: 18 }
]
}
}
it('renders without crashing', () => {
const { container } = render(
// @ts-expect-error: only testing first render
<Tags data={data} location={{ pathname: '/tags' } as any} />
)
expect(container.firstChild).toBeInTheDocument()
})
})