#834 Using space as separator, simplfifying the grammar some more, reomving some logging

This commit is contained in:
Knut Sveidqvist
2019-12-18 18:36:34 +01:00
parent 6598b1b10d
commit 42ef035241
5 changed files with 31 additions and 40 deletions

View File

@@ -22,6 +22,16 @@ describe('[Singlenodes] when parsing', () => {
expect(edges.length).toBe(0);
expect(vert['A'].styles.length).toBe(0);
});
it('should handle a single node with white space after it (SN1)', function() {
// Silly but syntactically correct
const res = flow.parser.parse('graph TD;A ;');
const vert = flow.parser.yy.getVertices();
const edges = flow.parser.yy.getEdges();
expect(edges.length).toBe(0);
expect(vert['A'].styles.length).toBe(0);
});
it('should handle a single square node', function() {
// Silly but syntactically correct