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

import Radio from './index';

test('Radio renders correctly', () => {
  const tree = renderer.create(
    <div>
      <Radio
        label="AT Commands"
        options={[
          { value: 'option1', label: 'Option 1' },
          { value: 'options2', label: 'Option 2' },
          { value: 'options3', label: 'Option 3' }
        ]}
        value="bonjour"
        onChange={() => {}}
      />
      <Radio
        label="AT Commands"
        options={{ key1: 'test', key2: 'test2' }}
        value="hello"
        onChange={() => {}}
      />
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
