<commit_before>// component test
import jsdom from "mocha-jsdom";
import assert from "assert";
import React from "react";
import ReactDOM from "react-dom";
import ReactTestUtils from "react-addons-test-utils";

import HelloWorld from "../src/components/HelloWorld.jsx";

describe("HelloWorld component", () => {

  jsdom();

  it("should exist", () => {
    assert.ok( !!HelloWorld );
  });

  it("should be react element", () => {
    assert.ok( ReactTestUtils.isElement(<HelloWorld />),
      "is not a react element" );
  });

  describe("rendering", () => {

    it("should display 'text' prop in DOM somehow", () => {
      const container = document.createElement("div");
      ReactDOM.render(<HelloWorld text="TEST" />, container);
      assert.ok( /TEST/.test(container.innerHTML), "It don't displays 'text' prop in DOM");
    });

  });

});<commit_msg>Rewrite test cases to chai<commit_after>// component test
import jsdom from "mocha-jsdom";
import assert from "assert";
import React from "react";
import ReactDOM from "react-dom";
import ReactTestUtils from "react-addons-test-utils";

import HelloWorld from "../src/components/HelloWorld.jsx";

describe("HelloWorld component", () => {

  jsdom();

  it("should exist", () => {
    expect(HelloWorld).to.exist;
  });

  it("should be react element", () => {
    ReactTestUtils.isElement(<HelloWorld />).should.be.ok;
  });

  describe("rendering", () => {

    it("should display 'text' prop in DOM somehow", () => {
      const container = document.createElement("div");
      ReactDOM.render(<HelloWorld text="TEST" />, container);
      container.innerHTML.should.contain("TEST");
    });

  });

});
{'fraction_non_alphanumeric': 0.17516496700659867, 'fraction_numerical': 0.0, 'mean_word_length': 3.8629737609329444, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6309357', 'n_tokens_mistral': 512, 'n_tokens_neox': 491, 'n_words': 126}