<commit_before>import React from 'react';
import { findDOMNode } from 'react-dom';
import ReactTestUtils from 'react-dom/test-utils';

import Toggle from '../src/Toggle';
import innerText from './innerText';

describe('Toggle', () => {

  it('Should output a toggle', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle />
    );
    assert.equal(findDOMNode(instance).className, 'toggle');
  });

  it('Should be disabled', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle disabled />
    );
    assert.ok(findDOMNode(instance).className.match(/\bdisabled\b/));
  });

  it('Should be checked', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle checked />
    );
    assert.ok(findDOMNode(instance).className.match(/\btoggle-checked\b/));
  });


  it('Should apply size class', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle size="lg" />
    );
    assert.ok(findDOMNode(instance).className.match(/\btoggle-lg\b/));
  });

  it('Should output a `off` in inner ', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle unCheckedChildren="off" />
    );
    assert.equal(innerText(findDOMNode(instance)), 'off');
  });

  it('Should output a `on` in inner ', () => {<commit_msg>Update test case<commit_after>import React from 'react';
import { findDOMNode } from 'react-dom';
import ReactTestUtils from 'react-dom/test-utils';

import Toggle from '../src/Toggle';
import innerText from './innerText';

describe('Toggle', () => {

  it('Should output a toggle', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle />
    );
    assert.equal(findDOMNode(instance).className, 'btn-toggle');
  });

  it('Should be disabled', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle disabled />
    );
    assert.ok(findDOMNode(instance).className.match(/\bdisabled\b/));
  });

  it('Should be checked', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle checked />
    );
    assert.ok(findDOMNode(instance).className.match(/\bbtn-toggle-checked\b/));
  });


  it('Should apply size class', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle size="lg" />
    );
    assert.ok(findDOMNode(instance).className.match(/\bbtn-toggle-lg\b/));
  });

  it('Should output a `off` in inner ', () => {
    const instance = ReactTestUtils.renderIntoDocument(
      <Toggle unCheckedChildren="off" />
    );
    assert.equal(innerText(findDOMNode(instance)), 'off');
  });

  it('Should output a `on` in inner ', () => {
{'fraction_non_alphanumeric': 0.16975425330812854, 'fraction_numerical': 0.0, 'mean_word_length': 3.530821917808219, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 27, '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': '3469368', 'n_tokens_mistral': 803, 'n_tokens_neox': 786, 'n_words': 158}