@navinc/base-react-components
Version:
Nav's Pattern Library
12 lines (10 loc) • 399 B
JavaScript
import { renderWithContext } from './tests/with-app-context.js'
import { screen } from '@testing-library/react'
import { Icon } from './icon.js'
describe('Icon', () => {
it('renders a svg if a proper name is supplied', async () => {
renderWithContext(<Icon name="actions/close" />)
const icon = await screen.findByTestId('icon:actions/close')
expect(icon).toBeInTheDocument()
})
})