<commit_before>import React from 'react';
import { shallow } from 'enzyme';

import DashboardBarChart from '../../../app/assets/javascripts/school_administrator_dashboard/dashboard_components/dashboard_bar_chart.jsx';
import HighchartsWrapper from '../../../app/assets/javascripts/student_profile/HighchartsWrapper';

describe('DashboardBarChart', () => {
  const chart = shallow(<DashboardBarChart
                        id="1" categories={{}} seriesData={[]} titleText="Title" measureText="Measure" tooltip={{}}
                        />);
  it('should render a highcharts wrapper', () => {
    expect(chart.find(HighchartsWrapper).length).toEqual(1);
  });

  it('should update when the series data changes', () => {
    const shouldUpdate = chart.instance().shouldComponentUpdate({seriesData: [3]});
    expect(shouldUpdate).toBe(true);
  });

  it('should not update when the series data changes', () => {
    const shouldUpdate = chart.instance().shouldComponentUpdate({seriesData: []});
    expect(shouldUpdate).toBe(false);
  });
});<commit_msg>test description should match test logic<commit_after>import React from 'react';
import { shallow } from 'enzyme';

import DashboardBarChart from '../../../app/assets/javascripts/school_administrator_dashboard/dashboard_components/dashboard_bar_chart.jsx';
import HighchartsWrapper from '../../../app/assets/javascripts/student_profile/HighchartsWrapper';

describe('DashboardBarChart', () => {
  const chart = shallow(<DashboardBarChart
                        id="1" categories={{}} seriesData={[]} titleText="Title" measureText="Measure" tooltip={{}}
                        />);
  it('should render a highcharts wrapper', () => {
    expect(chart.find(HighchartsWrapper).length).toEqual(1);
  });

  it('should update when the series data changes', () => {
    const shouldUpdate = chart.instance().shouldComponentUpdate({seriesData: [3]});
    expect(shouldUpdate).toBe(true);
  });

  it('should not update when the series data does not change', () => {
    const shouldUpdate = chart.instance().shouldComponentUpdate({seriesData: []});
    expect(shouldUpdate).toBe(false);
  });
});
{'fraction_non_alphanumeric': 0.16037296037296037, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 4.20873786407767, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5031391', 'n_tokens_mistral': 578, 'n_tokens_neox': 575, 'n_words': 119}