gremlin-graphviz
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -77,9 +77,23 @@ // lib/index.js | ||
// ## Non-mutatingmethods | ||
// All of the useful non-mutating methods are exported. | ||
['getNode', | ||
'edgeCount', | ||
'nodeCount', | ||
'output', | ||
'to_dot' | ||
// ## Methods | ||
// All of the useful methods are exported. | ||
[ | ||
'addCluster', | ||
'addEdge', | ||
'addNode', | ||
'clusterCount', | ||
'edgeCount', | ||
'get', | ||
'getCluster', | ||
'getEdgeAttribut', | ||
'getNode', | ||
'getNodeAttribut', | ||
'nodeCount', | ||
'output', | ||
'render', | ||
'set', | ||
'setEdgeAttribut', | ||
'setGraphVizPath', | ||
'setNodeAttribut', | ||
'to_dot' | ||
].map(haulMethod); | ||
@@ -86,0 +100,0 @@ |
{ | ||
"name": "gremlin-graphviz", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Use Graphviz to visualize Gremlin graphs.", | ||
@@ -36,3 +36,3 @@ "main": "lib/index.js", | ||
"docco": "^0.6.3", | ||
"gremlin-v3": "0.0.5", | ||
"gremlin-v3": ">=0.0.20", | ||
"heredoc": "^1.2.0", | ||
@@ -39,0 +39,0 @@ "jshint": "^2.5.10", |
@@ -242,2 +242,41 @@ // test/test.js | ||
it ('allows graph properties to be set/get', function () { | ||
return gremlinGraphviz(graph) | ||
.then(function (g) { | ||
// Set a valid graph property that should appear in the DOT. The valid set of properties are validated by | ||
// Graphviz at runtime. | ||
g.set('splines', true); | ||
expect(g.get('splines')).to.equal(true); | ||
expect(g.to_dot()).to.contain('splines = "true"'); | ||
}); | ||
}); | ||
it ('allows global node properties to be set/get', function () { | ||
return gremlinGraphviz(graph) | ||
.then(function (g) { | ||
g.setNodeAttribut('color', 'blue'); | ||
expect(g.getNodeAttribut('color')).to.equal('blue'); | ||
expect(g.to_dot()).to.contain('node [ color = "blue" ]'); | ||
}); | ||
}); | ||
it ('allows global edge properties to be set/get', function () { | ||
return gremlinGraphviz(graph) | ||
.then(function (g) { | ||
g.setEdgeAttribut('color', 'blue'); | ||
expect(g.getEdgeAttribut('color')).to.equal('blue'); | ||
expect(g.to_dot()).to.contain('edge [ color = "blue" ]'); | ||
}); | ||
}); | ||
it ('allows individual node properties to be set/get', function () { | ||
return gremlinGraphviz(graph) | ||
.then(function (g) { | ||
var node1 = g.getNode('1'); | ||
node1.set('color', 'blue'); | ||
expect(node1.get('color')).to.equal('blue'); | ||
expect(g.to_dot()).to.contain('"1" [ color = "blue" ]'); | ||
}); | ||
}); | ||
}); | ||
@@ -244,0 +283,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17746
401