import renderer from 'react-test-renderer';
import Image from './Image';
test('Image matches snapshot', () => {
const component = renderer.create(
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with overlay matches snapshot', () => {
const component = renderer.create(
Foo.png
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with fit: cover matches snapshot', () => {
const component = renderer.create(
Foo.png
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with fit: contain matches snapshot', () => {
const component = renderer.create(
Foo.png
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with fit: contain and role matches snapshot', () => {
const component = renderer.create(
Foo.png
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with crossorigin specified matches snapshot', () => {
const component = renderer.create(
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with fetchPriority specified matches snapshot', () => {
const component = renderer.create(
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
test('Image with decoding specified matches snapshot', () => {
const component = renderer.create(
,
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});