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

import UIStates from './index';

import Button from '../Button';

test('UiStates renders correctly', () => {
  const tree = renderer.create(
    <div>
      <UIStates
        loading={false}
        data={{ value: 'hello' }}
        Component={Button}
        label="hello"
      >
        {() => (<Button> hello </Button>)}
      </UIStates>
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
