1
0
Fork 0
blog/src/components/atoms/Changelog.test.tsx

17 lines
478 B
TypeScript
Raw Normal View History

2019-10-12 04:25:15 +02:00
import React from 'react'
2019-11-24 14:29:25 +01:00
import { render } from '@testing-library/react'
import Changelog from './Changelog'
2019-10-12 04:25:15 +02:00
describe('Changelog', () => {
2019-11-24 14:29:25 +01:00
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()
})
2019-10-12 04:25:15 +02:00
})