Commit c5e74bf6 authored by Maxime Chazalviel's avatar Maxime Chazalviel

add done on param

parent 8532a13b
......@@ -7,7 +7,7 @@ describe("Johnson cycle enumeration algorithm", function() {
flag = "Single";
});
it("should return an array of array", function() {
it("should return an array of array", function(done) {
console.log("JohnsonAlgorithm");
MetExploreViz.onloadMetExploreViz(function(){
expect( metExploreD3.GraphFunction.JohnsonAlgorithm(graph, flag) ).toBeDefined();
......@@ -19,14 +19,14 @@ describe("Johnson cycle enumeration algorithm", function() {
done();
});
});
it("should return the correct number of cycles", function() {
it("should return the correct number of cycles", function(done) {
MetExploreViz.onloadMetExploreViz(function(){
expect( metExploreD3.GraphFunction.JohnsonAlgorithm(graph, flag).length ).toBe(2);
expect( metExploreD3.GraphFunction.JohnsonAlgorithm(graph, "All").length ).toBe(3);
done();
});
});
it("the cycles returned should be the expected ones", function() {
it("the cycles returned should be the expected ones", function(done) {
MetExploreViz.onloadMetExploreViz(function(){
expect( metExploreD3.GraphFunction.JohnsonAlgorithm(graph, flag)[0] ).toEqual([0, 1, 2, 3, 4]);
expect( metExploreD3.GraphFunction.JohnsonAlgorithm(graph, flag)[1] ).toEqual([0, 1, 2, 3, 4, 5, 6, 7]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment