<commit_before>import React from 'react';
import ReactDOM from 'react-dom';
import { shallow, mount, render } from 'enzyme';
import UserList from './UserList';

it('renders without crashing', () => {
  const userList = [];
  const div = document.createElement('div');
  ReactDOM.render(<UserList UserList={userList}/>, div);
});

it('UserList is selectable with the .UserList class', () => {
  const userList = [];
  const component = shallow(
    <UserList UserList={userList} />
  );

  expect(component.is('.UserList')).toBe(false); // Fail deliberately to test travis-ci
});

// Cannot write a meaningful test on this until
// refs are supported by .shallow()

// it('clicking the button runs onClick prop', () => {
//   const count = 1;
//   const userList = [];
//   const onClick = () => { count++; };
//   const component = shallow(
//     <UserList UserList={userList} onClick={onClick} />
//   );
//   expect(count).toEqual(1);
//
//   component.find('button').simulate('click', { stopPropagation: () => undefined });
//
//   expect(count).toEqual(2);
// });
<commit_msg>Revert "deliberately fail test to test travis-ci"<commit_after>import React from 'react';
import ReactDOM from 'react-dom';
import { shallow, mount, render } from 'enzyme';
import UserList from './UserList';

it('renders without crashing', () => {
  const userList = [];
  const div = document.createElement('div');
  ReactDOM.render(<UserList UserList={userList}/>, div);
});

it('UserList is selectable with the .UserList class', () => {
  const userList = [];
  const component = shallow(
    <UserList UserList={userList} />
  );

  expect(component.is('.UserList')).toBe(true);
});

// Cannot write a meaningful test on this until
// refs are supported by .shallow()

// it('clicking the button runs onClick prop', () => {
//   const count = 1;
//   const userList = [];
//   const onClick = () => { count++; };
//   const component = shallow(
//     <UserList UserList={userList} onClick={onClick} />
//   );
//   expect(count).toEqual(1);
//
//   component.find('button').simulate('click', { stopPropagation: () => undefined });
//
//   expect(count).toEqual(2);
// });

{'fraction_non_alphanumeric': 0.18906394810009267, 'fraction_numerical': 0.0027803521779425394, 'mean_word_length': 3.643010752688172, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '5550967', 'n_tokens_mistral': 659, 'n_tokens_neox': 657, 'n_words': 177}