import React from 'react';
import renderer from 'react-test-renderer'; // eslint-disable-line import/no-extraneous-dependencies

import Cropper from './index';

test('Cropper renders correctly', () => {
  const value = {
    preview: '/large.jpg',
    name: 'large.jpg',
    type: 'image/jpeg'
  };
  const tree = renderer.create(
    <div>
      <Cropper
        value={value}
        onCancelCrop={() => {}}
        onCrop={() => {}}
      />
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
