UNPKG

@roo-ui/components

Version:

26 lines (20 loc) 608 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 BackgroundImage from '.'; describe('<BackgroundImage />', () => { let wrapper; beforeEach(() => { wrapper = shallowWithTheme( <BackgroundImage src="/example.jpg">Hello world</BackgroundImage>, theme, ); }); it('renders correctly', () => { expect(wrapper).toMatchSnapshot(); }); it('has no accessibility errors', async () => { expect(await axe(wrapper.html())).toHaveNoViolations(); }); });