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

import SortableList from './index';

test('SortableList renders correctly', () => {
  const tree = renderer.create(
    <SortableList
      list={[
        { _id: 1, value: '1' },
        { _id: 2, value: '2' },
        { _id: 3, value: '3' }
      ]}
      keyProp="_id"
      listName="list"
      onChange={items => console.log('SortableList [onChange] : ', items)}
    >
      {item => <div>{item.value}</div>}
    </SortableList>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
