<commit_before>/* eslint-disable import/no-extraneous-dependencies,react/no-find-dom-node */
/* eslint-env mocha */
import { expect } from 'chai';
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import Button from './Button';

describe('Button', () => {
  const renderer = ReactTestUtils.createRenderer();
  let wrapper;

  beforeEach(() => {
    renderer.render(<Button />);
    wrapper = renderer.getRenderOutput();
  });

  it('should render empty as a button', () => {
    expect(wrapper.type).to.equal('button');
  });
});
<commit_msg>Adding test for div wrapper<commit_after>/* eslint-disable import/no-extraneous-dependencies,react/no-find-dom-node */
/* eslint-env mocha */
import { expect } from 'chai';
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import Button from './Button';

describe('Button', () => {
  const renderer = ReactTestUtils.createRenderer();

  it('should always render as a button', () => {
    renderer.render(<Button />);
    const wrapper = renderer.getRenderOutput();

    expect(wrapper.type).to.equal('button');
  });

  it('should wrap children in div if array', () => {
    renderer.render((
      <Button>
        <span>First</span>
        <span>Second</span>
      </Button>
    ));
    const wrapper = renderer.getRenderOutput();

    expect(wrapper.type).to.equal('button');
    expect(wrapper.children.type).to.equal('div');
  });
});

{'fraction_non_alphanumeric': 0.173582295988935, 'fraction_numerical': 0.0, 'mean_word_length': 3.8073089700996676, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3300364', 'n_tokens_mistral': 448, 'n_tokens_neox': 436, 'n_words': 95}