@roo-ui/components
Version:
23 lines (17 loc) • 532 B
JavaScript
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 Image from '.';
describe('<Image />', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowWithTheme(<Image src="/example.jpg" />, theme);
});
it('renders correctly', () => {
expect(wrapper).toMatchSnapshot();
});
it('has no accessibility errors', async () => {
expect(await axe(wrapper.html())).toHaveNoViolations();
});
});