<commit_before>import React from "react";
import Expiriment from "../src/Expiriment.jsx";
import Variant from "../src/Variant.jsx";
import assert from "assert";
import co from "co";
import ES6Promise from 'es6-promise';
ES6Promise.polyfill();

describe("Core", function() {
  before(function(){
    let container = document.createElement("div");
    container.id = "react";
    document.getElementsByTagName('body')[0].appendChild(container);
  });
  after(function(){
    let container = document.getElementById("react");
    document.getElementsByTagName('body')[0].removeChild(container);
  });
  it("should render the correct variant.", co.wrap(function *(){
    let App = React.createClass({
      render: function(){
        return <Expiriment name="test" value="A">
          <Variant name="A"><div id="expiriment-a" /></Variant>
          <Variant name="B"><div id="expiriment-b" /></Variant>
        </Expiriment>;
      }
    });
    yield new Promise(function(resolve, reject){
      React.render(<App />, document.getElementById("react"), resolve);
    });
    let element_a = document.getElementById('expiriment-a');
    let element_b = document.getElementById('expiriment-b');
    assert.notEqual(element_a, null);
    assert.equal(element_b, null);
  }));
  it("should callback when a variant is played.", co.wrap(function *(){
    let played_variant = null;
    let playCallback = function(variant){
      played_variant = variant;
    };
    let App = React.createClass({
      render: function(){
        return <Expiriment name="test" value="A" onPlay={playCallback}>
          <Variant name="A"><div id="expiriment-a"/></Variant>
          <Variant name="B"><div id="expiriment-b"/></Variant>
        </Expiriment>;
      }
    });
    yield new Promise(function(resolve, reject){
      React.render(<App />, document.getElementById("react"), resolve);
    });
    assert.equal(played_variant, "A");
  }));
  it("should fail.", co.wrap(function *(){
    assert.equal(true, false);
  }));
});


<commit_msg>Updated CircleCI Build Setup, removing test failure.<commit_after>import React from "react";
import Expiriment from "../src/Expiriment.jsx";
import Variant from "../src/Variant.jsx";
import assert from "assert";
import co from "co";
import ES6Promise from 'es6-promise';
ES6Promise.polyfill();

describe("Core", function() {
  before(function(){
    let container = document.createElement("div");
    container.id = "react";
    document.getElementsByTagName('body')[0].appendChild(container);
  });
  after(function(){
    let container = document.getElementById("react");
    document.getElementsByTagName('body')[0].removeChild(container);
  });
  it("should render the correct variant.", co.wrap(function *(){
    let App = React.createClass({
      render: function(){
        return <Expiriment name="test" value="A">
          <Variant name="A"><div id="expiriment-a" /></Variant>
          <Variant name="B"><div id="expiriment-b" /></Variant>
        </Expiriment>;
      }
    });
    yield new Promise(function(resolve, reject){
      React.render(<App />, document.getElementById("react"), resolve);
    });
    let element_a = document.getElementById('expiriment-a');
    let element_b = document.getElementById('expiriment-b');
    assert.notEqual(element_a, null);
    assert.equal(element_b, null);
  }));
  it("should callback when a variant is played.", co.wrap(function *(){
    let played_variant = null;
    let playCallback = function(variant){
      played_variant = variant;
    };
    let App = React.createClass({
      render: function(){
        return <Expiriment name="test" value="A" onPlay={playCallback}>
          <Variant name="A"><div id="expiriment-a"/></Variant>
          <Variant name="B"><div id="expiriment-b"/></Variant>
        </Expiriment>;
      }
    });
    yield new Promise(function(resolve, reject){
      React.render(<App />, document.getElementById("react"), resolve);
    });
    assert.equal(played_variant, "A");
  }));
});



{'fraction_non_alphanumeric': 0.16957605985037408, 'fraction_numerical': 0.0024937655860349127, 'mean_word_length': 3.6531322505800463, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '764317', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1165, 'n_words': 255}