import axe from '../../../../axe-helper'; import React from 'react'; import { render } from '@testing-library/react'; import Link from './Link'; describe('', () => { it('renders the link with default values and the svg is hidden with no a11y violations', async () => { const { container } = render(text); expect(container.firstChild).toMatchSnapshot(); const results = await axe(container.innerHTML); expect(results).toHaveNoViolations(); }); it('renders the link with target _blank with the svg visible', () => { const { container } = render( text , ); expect(container.firstChild).toMatchSnapshot(); }); it('doesnt render the link with a target icon', () => { const { container } = render( text , ); expect(container.firstChild).toMatchSnapshot(); }); it('renders for being displayed on top of dark backgrounds', () => { const { container } = render( text , ); expect(container.firstChild).toMatchSnapshot(); }); });