diff --git a/test/rank/feasible-tree-test.js b/test/rank/feasible-tree-test.js index 53f2f8c9..72f3e1a2 100644 --- a/test/rank/feasible-tree-test.js +++ b/test/rank/feasible-tree-test.js @@ -1,21 +1,21 @@ -var expect = require("../chai").expect; -var Graph = require("@dagrejs/graphlib").Graph; -var feasibleTree = require("../../lib/rank/feasible-tree"); +let expect = require("../chai").expect; +let Graph = require("@dagrejs/graphlib").Graph; +let feasibleTree = require("../../lib/rank/feasible-tree"); describe("feasibleTree", () => { it("creates a tree for a trivial input graph", () => { - var g = new Graph() + let g = new Graph() .setNode("a", { rank: 0 }) .setNode("b", { rank: 1 }) .setEdge("a", "b", { minlen: 1 }); - var tree = feasibleTree(g); + let tree = feasibleTree(g); expect(g.node("b").rank).to.equal(g.node("a").rank + 1); expect(tree.neighbors("a")).to.eql(["b"]); }); it("correctly shortens slack by pulling a node up", () => { - var g = new Graph() + let g = new Graph() .setNode("a", { rank: 0 }) .setNode("b", { rank: 1 }) .setNode("c", { rank: 2 }) @@ -23,7 +23,7 @@ describe("feasibleTree", () => { .setPath(["a", "b", "c"], { minlen: 1 }) .setEdge("a", "d", { minlen: 1 }); - var tree = feasibleTree(g); + let tree = feasibleTree(g); expect(g.node("b").rank).to.eql(g.node("a").rank + 1); expect(g.node("c").rank).to.eql(g.node("b").rank + 1); expect(g.node("d").rank).to.eql(g.node("a").rank + 1); @@ -34,7 +34,7 @@ describe("feasibleTree", () => { }); it("correctly shortens slack by pulling a node down", () => { - var g = new Graph() + let g = new Graph() .setNode("a", { rank: 2 }) .setNode("b", { rank: 0 }) .setNode("c", { rank: 2 })