import { render, screen, testA11y } from '@fuels/jest'; import { Box } from './Box'; describe('Box', () => { it('a11y', async () => { await testA11y(Text); }); it('should render a basic div', () => { const { container } = render(Text); expect(container.querySelector('div')).toBeInTheDocument(); expect(screen.getByRole('region')).toBeInTheDocument(); expect(screen.getByText('Text')).toBeInTheDocument(); }); it('should change element with as prop', async () => { const { container } = render( Text , ); expect(container.querySelector('article')).toBeInTheDocument(); expect(screen.getByRole('region')).toBeInTheDocument(); expect(screen.getByText('Text')).toBeInTheDocument(); }); });