<commit_before>import React from 'react'
import renderer from 'react-test-renderer';

import TextInput from '../../Components/FormInput/TextInput';


it('renders TextInput without crashing with good props', () => {
  const data = "not an array";


  const component = renderer.create(
    <TextInput
          id="Id"
          label="Label"
          helperText="Helper Text"
          placeholder="Enter indicator name"
          touched={null}
          error=""
          value="value"
          onChange={null}
          onBlur={null}
          style={{ float: 'left' }}
        />
  );

  let tree = component.toJSON();

  expect(tree).toMatchSnapshot();
});

<commit_msg>Finished jest part of FormInputComponent test<commit_after>import React from 'react'
import renderer from 'react-test-renderer';

import TextInput from '../../Components/FormInput/TextInput';


it('renders TextInput without crashing with good props', () => {
  const data = "not an array";


  const component = renderer.create(
    <TextInput
          id="Id"
          label="Label"
          helperText="Helper Text"
          placeholder="Enter indicator name"
          touched={null}
          error=""
          value="value"
          onChange={null}
          onBlur={null}
          style={{ float: 'left' }}
        />
  );

  let tree = component.toJSON();

  expect(tree).toMatchSnapshot();
});

it('renders TextInput without crashing with good props and error set', () => {
  const data = "not an array";


  const component = renderer.create(
    <TextInput
          id="Id"
          label="Label"
          helperText="Helper Text"
          placeholder="Enter indicator name"
          touched={null}
          error="an error text"
          value="value"
          onChange={null}
          onBlur={null}
          style={{ float: 'left' }}
        />
  );

  let tree = component.toJSON();

  expect(tree).toMatchSnapshot();
});


it('renders TextInput without crashing if id is not set or value is empty', () => {
  const data = "not an array";


  const component = renderer.create(
    <TextInput
          id=""
          label="Label"
          helperText="Helper Text"
          placeholder="Enter indicator name"
          touched={null}
          error="an error text"
          value=""
          onChange={null}
          onBlur={null}
          style={{ float: 'left' }}
        />
  );

  let tree = component.toJSON();

  expect(tree).toMatchSnapshot();
});

it('renders a numeric TextInput without crashing', () => {
  const data = "not an array";


  const component = renderer.create(
    <TextInput
          id="Id"
          label="Label"
          helperText="Helper Text"
          placeholder="Enter indicator name"
          touched={null}
          error="an error text"
          value="1323"
          onChange={null}
          onBlur={null}
          numeric
        />
  );

  let tree = component.toJSON();

  expect(tree).toMatchSnapshot();
});

{'fraction_non_alphanumeric': 0.12903225806451613, 'fraction_numerical': 0.0013440860215053765, 'mean_word_length': 2.1436114044350583, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 13, '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': '1201852', 'n_tokens_mistral': 826, 'n_tokens_neox': 811, 'n_words': 216}