UNPKG

@roo-ui/components

Version:

23 lines (17 loc) 526 B
import React from 'react'; import { qantas as theme } from '@roo-ui/themes'; import { shallowWithTheme } from '@roo-ui/test-utils'; import { axe } from 'jest-axe'; import Text from '.'; describe('<Text />', () => { let wrapper; beforeEach(() => { wrapper = shallowWithTheme(<Text>Hello world</Text>, theme); }); it('renders correctly', () => { expect(wrapper).toMatchSnapshot(); }); it('has no accessibility errors', async () => { expect(await axe(wrapper.html())).toHaveNoViolations(); }); });