import { testA11y, render, screen } from '@fuels/jest';
import { Link } from './Link';
describe('Link', () => {
it('a11y', async () => {
await testA11y(Click);
});
it('should render a basic link component', () => {
const { container } = render(Click);
expect(container.querySelector('a')).toBeInTheDocument();
expect(screen.getByRole('link')).toBeInTheDocument();
});
it('should add an external icon when isExternal prop is passed', () => {
const { container } = render(
Click
,
);
expect(container.querySelector('a')).toBeInTheDocument();
expect(container.querySelector('svg')).toBeInTheDocument();
expect(screen.getByRole('link')).toBeInTheDocument();
});
});