import { h } from 'preact';
import { render } from '@testing-library/preact';
import { axe } from 'jest-axe';
import CogIcon from '@images/cog.svg';
import { Link } from '@crayons';
describe('', () => {
it('has no accessibility violations', async () => {
const { container } = render(Hello world!);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
it('renders default link', () => {
const { container } = render(Hello world!);
expect(container.innerHTML).toMatchSnapshot();
});
it('renders branded link', () => {
const { container } = render(
Hello world!
,
);
expect(container.innerHTML).toMatchSnapshot();
});
it('renders block link', () => {
const { container } = render(
Hello world!
,
);
expect(container.innerHTML).toMatchSnapshot();
});
it('renders rounded link', () => {
const { container } = render(
Hello world!
,
);
expect(container.innerHTML).toMatchSnapshot();
});
it('renders a link with icon alone', () => {
const { container } = render();
expect(container.innerHTML).toMatchSnapshot();
});
it('renders with icon and text', () => {
const { container } = render(
Hello world!
,
);
expect(container.innerHTML).toMatchSnapshot();
});
it('renders with additional classnames', () => {
const { container } = render(
Hello world!
,
);
expect(container.innerHTML).toMatchSnapshot();
});
});