import { render, screen, testA11y } from '@fuels/jest'; import { Badge } from './Badge'; describe('Badge', () => { it('a11y', async () => { await testA11y(Label); }); it('should render a span with inner text as Label', () => { const { container } = render(Label); expect(container.querySelector('span')).toBeInTheDocument(); expect(screen.getByText('Label')).toBeInTheDocument(); }); it('should change element with as prop', async () => { const { container } = render(Label); expect(container.querySelector('div')).toBeInTheDocument(); }); });