1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 00:27:58 +02:00
blog/src/components/atoms/Changelog.test.tsx

18 lines
479 B
TypeScript

import React from 'react'
import { render } from '@testing-library/react'
import Changelog from './Changelog'
describe('Changelog', () => {
it('renders without crashing', () => {
const { container, rerender } = render(
<Changelog repo="gatsby-plugin-matomo" />
)
expect(container.firstChild).toBeInTheDocument()
// return nothing when no match
rerender(<Changelog repo="nomatch" />)
expect(container.firstChild).not.toBeInTheDocument()
})
})