Fix import path in JS test
utils = require "../../utils"
{StaticLayoutProvider} = utils.require("models/graphs/static_layout_provider")
-{GraphDataSource} = utils.require("models/graphs/graph_data_source")
+{GraphSource} = utils.require("models/graphs/graph_source")
describe "StaticLayoutProvider", ->
@@ -21,7 +21,7 @@ describe "StaticLayoutProvider", ->
describe "get_node_coordinates method", ->
it "should return node coords if exist", ->
- graph_source = new GraphDataSource()
+ graph_source = new GraphSource()
graph_source.nodes.data.index = [0,1,2,3]
[xs, ys] = @layout_provider.get_node_coordinates(graph_source)
@@ -29,7 +29,7 @@ describe "StaticLayoutProvider", ->
expect(ys).to.be.deep.equal([0,1,0,-1])
it "should return nulls if coords don't exist", ->
- graph_source = new GraphDataSource()
+ graph_source = new GraphSource()
graph_source.nodes.data.index = [4,5,6]
[xs, ys] = @layout_provider.get_node_coordinates(graph_source)
@@ -39,7 +39,7 @@ describe "StaticLayoutProvider", ->
describe "get_node_coordinates method", ->
it "should return edge coords if exist", ->
- graph_source = new GraphDataSource()
+ graph_source = new GraphSource()
graph_source.nodes.data.index = [0,1,2,3]
graph_source.edges.data.start = [0,0,0]
graph_source.edges.data.end = [1,2,3]
@@ -49,7 +49,7 @@ describe "StaticLayoutProvider", ->
expect(ys).to.be.deep.equal([ [ 0, 1 ], [ 0, 0 ], [ 0, -1 ] ])
it "should return nulls if coords don't exist", ->
- graph_source = new GraphDataSource()
+ graph_source = new GraphSource()
graph_source.nodes.data.index = [4,5,6,7]
graph_source.edges.data.start = [4,4,4]
graph_source.edges.data.end = [5,6,7]
