(graph, layout, test)
| 25 | }); |
| 26 | |
| 27 | function assertGraphHasPositions(graph, layout, test) { |
| 28 | graph.forEachNode(function(node) { |
| 29 | var position = layout.getNodePosition(node.id); |
| 30 | test.ok(position, 'All nodes expected to have some position'); |
| 31 | test.ok(typeof position.x === 'number', 'Node position does not have a valid x position'); |
| 32 | test.ok(typeof position.y === 'number', 'Node position does not have a valid y position'); |
| 33 | }); |
| 34 | } |