<commit_before>var assert = chai.assert;
var expect = chai.expect;

var loader;
var reader = new FileReader();
var graph = new joint.dia.Graph();
graph.links = [];
graph.intensionConstraints = [];
graph.linksNum;
graph.constraintsNum;
graph.allElements = [];
graph.elementsBeforeAnalysis = [];
var graphList = [];
var source = (function() {
  var sourceData;

  function getData(done) {
    if(sourceData){
      done(sourceData);
    } else {
      $.getJSON("./test/cycle_loop1.json", function(data) {
        sourceData = data;
        done(data);
      });
    }
  }
  return {
    getData: getData
  };
})();
var source2 = (function() {
  var sourceData;

  function getData(done) {
    if(sourceData){
      done(sourceData);
    } else {
      $.getJSON("./test/cycle_loop2.json", function(data) {
        sourceData = data;
        done(data);
      });
    }
  }
  return {
    getData: getData
  };
})();
describe('Cycle Check 1', function() {
  it('Loop 1', function () {
     source.getData(function(sourceData){
       var analysis = new InputAnalysis();
     	 var links = new InputLink();
     	 var js_object = {};
     	 var js_links = getLinks();
     	 js_object.analysis = getElementList(analysis);
       graph.fromJSON(sourceData);
       this.graphList = graph.getElements();
       this.links = graph.getLinks();
       console.log(getElementList());
       console.log(getLinks());
       var testLink = getLinks();
       var testNodes = getElementList();
       var isCycle = cycleCheck(testLink,testNodes);
       expect(isCycle).to.equal(true);
     })
  })
});
(function() {
    describe("Cycle check 2", function() {
      it("Should expect no loop", function(done){
        source2.getData(function(sourceData){
          var analysis = new InputAnalysis();
          var links = new InputLink();
          var js_object = {};
          var js_links = getLinks();
          js_object.analysis = getElementList(analysis);
          graph.fromJSON(sourceData);
          this.graphList = graph.getElements();
          this.links = graph.getLinks();
          console.log(getElementList());
          console.log(getLinks());
          var testLink = getLinks();
          var testNodes = getElementList();
          var isCycle = cycleCheck(testLink,testNodes);
          console.log(isCycle);
          expect(isCycle).to.equal(false);
          done();
        });
      });
    });
})();
/*
describe('Read file', function() {

  describe('Cycle check', function() {
    console.log(graph.getElements());
  })
  it('should start empty', function() {
    //var testJson = new File(");

  });
  after(function() {});


});*/
<commit_msg>modification to test<commit_after>var assert = chai.assert;
var expect = chai.expect;

var loader;
var reader = new FileReader();
var graph = new joint.dia.Graph();
graph.links = [];
graph.intensionConstraints = [];
graph.linksNum;
graph.constraintsNum;
graph.allElements = [];
graph.elementsBeforeAnalysis = [];
var graphList = [];

// Load cycle_loop1.json file
var source = (function() {
  var sourceData;

  function getData(done) {
    if(sourceData){
      done(sourceData);
    } else {
      $.getJSON("./blooming_test/cycle_loop1.json", function(data) {
        sourceData = data;
        done(data);
      });
    }
  }
  return {
    getData: getData
  };
})();

// Load cycle_loop2.json file
var source2 = (function() {
  var sourceData;

  function getData(done) {
    if(sourceData){
      done(sourceData);
    } else {
      $.getJSON("./blooming_test/cycle_loop2.json", function(data) {
        sourceData = data;
        done(data);
      });
    }
  }
  return {
    getData: getData
  };
})();
describe('Cycle Check 1', function() {
  it('Loop 1', function () {
     source.getData(function(sourceData){
       var analysis = new InputAnalysis();
     	 var links = new InputLink();
     	 var js_object = {};
     	 var js_links = getLinks();
     	 js_object.analysis = getElementList(analysis);
       graph.fromJSON(sourceData);
       this.graphList = graph.getElements();
       this.links = graph.getLinks();
       console.log(getElementList());
       console.log(getLinks());
       var testLink = getLinks();
       var testNodes = getElementList();
       var isCycle = cycleCheck(testLink,testNodes);
       expect(isCycle).to.equal(true);
     })
  })
});
(function() {
    describe("Cycle check 2", function() {
      it("Should expect no loop", function(done){
        source2.getData(function(sourceData){
          var analysis = new InputAnalysis();
          var links = new InputLink();
          var js_object = {};
          var js_links = getLinks();
          js_object.analysis = getElementList(analysis);
          graph.fromJSON(sourceData);
          this.graphList = graph.getElements();
          this.links = graph.getLinks();
          console.log(getElementList());
          console.log(getLinks());
          var testLink = getLinks();
          var testNodes = getElementList();
          var isCycle = cycleCheck(testLink,testNodes);
          console.log(isCycle);
          expect(isCycle).to.equal(false);
          done();
        });
      });
    });
})();
/*
describe('Read file', function() {

  describe('Cycle check', function() {
    console.log(graph.getElements());
  })
  it('should start empty', function() {
    //var testJson = new File(");

  });
  after(function() {});


});*/

{'fraction_non_alphanumeric': 0.15157661810805828, 'fraction_numerical': 0.0029503964595242486, 'mean_word_length': 2.589675711449371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '955607', 'n_tokens_mistral': 1630, 'n_tokens_neox': 1613, 'n_words': 330}