<commit_before>
'use strict';

import React from 'react';
import { shallow } from 'enzyme';

import { expect } from 'chai';

import { Col } from 'react-bootstrap';

import Statusbar from '../../../../../client/scripts/arcademode/components/Statusbar';

const props = {
  lives: 5,
  timeLeft: '01:00',
  passOption: true,
  onClickPass: () => {},
  sessionScore: 0,
  isSessionStarted: false
};

describe('Component: <Statusbar>', () => {
  it('should render', () => {
    const wrapper = shallow(<Statusbar {...props} />);
    expect(wrapper).to.have.length(1);
  });

  it('should render all subcomponents', () => {
    const wrapper = shallow(<Statusbar {...props} />);
    expect(wrapper.find(Col)).to.have.length(4);

    const lives = document.createElement('div');
    lives.innerHTML = wrapper.find(Col).first().html();
    expect(lives.textContent).to.include('x 5');

    const timeLeftText = document.createElement('div');
    timeLeftText.innerHTML = wrapper.find(Col).at(1).html();
    expect(timeLeftText.textContent).to.equal('Time left: 01:00');

    const passBtn = document.createElement('button');
    passBtn.innerHTML = wrapper.find(Col).at(2).html();
    expect(passBtn.textContent).to.equal('Pass');
    expect(wrapper.find(Col).at(2).props().children.props.disabled).to.be.true;

    const score = document.createElement('div');
    score.innerHTML = wrapper.find(Col).last().html();
    expect(score.textContent).to.equal('Score: 0');
  });
});<commit_msg>length=5 with the addition of streakMultiplier<commit_after>
'use strict';

import React from 'react';
import { shallow } from 'enzyme';

import { expect } from 'chai';

import { Col } from 'react-bootstrap';

import Statusbar from '../../../../../client/scripts/arcademode/components/Statusbar';

const props = {
  lives: 5,
  timeLeft: '01:00',
  passOption: true,
  onClickPass: () => {},
  sessionScore: 0,
  isSessionStarted: false
};

describe('Component: <Statusbar>', () => {
  it('should render', () => {
    const wrapper = shallow(<Statusbar {...props} />);
    expect(wrapper).to.have.length(1);
  });

  it('should render all subcomponents', () => {
    const wrapper = shallow(<Statusbar {...props} />);
    expect(wrapper.find(Col)).to.have.length(5);

    const lives = document.createElement('div');
    lives.innerHTML = wrapper.find(Col).first().html();
    expect(lives.textContent).to.include('x 5');

    const timeLeftText = document.createElement('div');
    timeLeftText.innerHTML = wrapper.find(Col).at(1).html();
    expect(timeLeftText.textContent).to.equal('Time left: 01:00');

    const passBtn = document.createElement('button');
    passBtn.innerHTML = wrapper.find(Col).at(2).html();
    expect(passBtn.textContent).to.equal('Pass');
    expect(wrapper.find(Col).at(2).props().children.props.disabled).to.be.true;

    const score = document.createElement('div');
    score.innerHTML = wrapper.find(Col).last().html();
    expect(score.textContent).to.equal('Score: 0');
  });
});
{'fraction_non_alphanumeric': 0.19398998330550918, 'fraction_numerical': 0.011686143572621035, 'mean_word_length': 4.0608108108108105, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '2367960', 'n_tokens_mistral': 952, 'n_tokens_neox': 926, 'n_words': 171}