// @flow
import React from 'react';
import { renderSnapshot } from '../../../../utils/tests';

import type { SelectorProps } from './selector.proptypes';
import { Selector } from './index';

const DEFAULT_PROPS: SelectorProps = {
  children: <span>child</span>,
  name: 'great-name',
  type: 'checkbox',
  onChange: jest.fn(),
};

describe('Selector', () => {
  describe('snapshot', () => {
    it('matches the previous snapshot', () => {
      const selector = renderSnapshot(<Selector {...DEFAULT_PROPS} />);
      expect(selector).toMatchSnapshot();
    });
  });
});
