import * as React from 'react'; import Counter from './Counter'; import {render} from '@testing-library/react'; import {testA11y} from '../../axe'; describe('Counter', () => { it('renders points icon inside the points counter', () => { const counter = render( 12 ); expect(counter.getByRole('img')).toBeTruthy(); }); describe('a11y', () => { it('should have no a11y violations when a label is provided', async () => { await testA11y(32); }); it('should have no a11y violations when an icon is provided', async () => { await testA11y( 32 ); }); }); });