<commit_before>const expect = require('chai').expect;
import { shallow } from 'enzyme';
import Stats from './statsPresenter';

describe('Stats', () => {
  it('renders three graphs', () => {
    const wrapper = shallow(<Stats />);
    expect(wrapper.find('.graphs')).to.have.length(3);
  });
  it('renders two predictions', () => {
    const wrapper = shallow(<Stats />);
    expect(wrapper.find('.health-scores')).to.have.length(2);
  });
});<commit_msg>Update statsSpec.js<commit_after>const expect = require('chai').expect;
import { shallow } from 'enzyme';
import Stats from './statsPresenter';

describe('Stats', () => {
  const chartData = {
    labels: [],
    datasets: [
      { fillColor: 'rgba(15,28,47,0.2)',
        strokeColor: 'rgba(15,28,47,0.2)',
        pointColor: 'rgba(15,28,47,0.2)',
        data: [] },
    ],
  };
  const props = {
    user: {},
    stats: {},
    stepsChartData: chartData,
    sleepChartData: chartData,
    hrChartData: chartData,
  };
  it('renders two predictions', () => {
    const wrapper = shallow(<Stats {...props} />);
    const children = wrapper.find('.health-scores').node.props.children;
    expect(children).to.have.length(2);
  });
  it('renders three graphs', () => {
    const wrapper = shallow(<Stats {...props} />);
    const children = wrapper.find('.graphs').node.props.children;
    expect(children).to.have.length(3);
  });
});
{'fraction_non_alphanumeric': 0.20474137931034483, 'fraction_numerical': 0.020114942528735632, 'mean_word_length': 3.4790996784565915, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7639146', 'n_tokens_mistral': 465, 'n_tokens_neox': 444, 'n_words': 82}