#834 Adding unit tests and rendering tests

This commit is contained in:
Knut Sveidqvist
2019-12-18 19:13:56 +01:00
parent a3378f8d03
commit a4e7305d52
3 changed files with 208 additions and 0 deletions

View File

@@ -228,6 +228,14 @@ describe('when parsing subgraphs', function() {
const vert = flow.parser.yy.getVertices();
const edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow');
});
it('should handle subgraphs with multi node statements in it', function() {
const res = flow.parser.parse('graph TD\nA-->B\nsubgraph myTitle\na b --> c e\n end;');
const vert = flow.parser.yy.getVertices();
const edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow');
});
});