Add tests for graph.js