import * as React from 'react'; import Text from './Text'; import {TEXT_AS} from './textConsts'; import {render} from '@testing-library/react'; import {testA11y} from '../../axe'; describe('Text', () => { it('render', () => { const text = render(Test); expect(text.queryByText('Test')).toBeTruthy(); }); it('type', () => { const text = 'random text'; const component = render({text}); // @ts-ignore TS2531 expect(component.queryByText(text).tagName).toEqual('SPAN'); }); describe('a11y', () => { it('should have no a11y violations', async () => { await testA11y(Read more); }); }); });