import { h } from 'preact'; import { render } from '@testing-library/preact'; import { axe } from 'jest-axe'; import { CTA } from '@crayons'; describe('', () => { it('has no accessibility errors in default variant', async () => { const { container } = render(Hello world!); const results = await axe(container); expect(results).toHaveNoViolations(); }); it('has no accessibility errors in branded variant', async () => { const { container } = render(Hello world!); const results = await axe(container); expect(results).toHaveNoViolations(); }); it('renders default CTA', () => { const { container } = render(Hello world!); expect(container.innerHTML).toMatchSnapshot(); }); it('renders branded CTA', () => { const { container } = render(Hello world!); expect(container.innerHTML).toMatchSnapshot(); }); });