aaronjy-me/__test__/components/Grid.test.jsx
2024-08-22 19:44:11 +01:00

16 lines
476 B
JavaScript

/* eslint-env jest */
import { render } from '@testing-library/react'
import '@testing-library/jest-dom'
import Grid from '@/components/Grid/Grid'
describe('Grid', () => {
it('renders without crashing', () => {
const { container } = render(<Grid />)
expect(container.firstChild).toHaveClass('grid')
})
it('renders its children', () => {
const { getByText } = render(<Grid><div>Child</div></Grid>)
expect(getByText('Child')).toBeInTheDocument()
})
})