From c9f84ccae5f95854724fa69995dde826827e8593 Mon Sep 17 00:00:00 2001 From: Brian Mearns Date: Thu, 3 Oct 2019 06:41:36 -0400 Subject: [PATCH] #530 Testing Coverage --- src/diagrams/flowchart/parser/flow.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/diagrams/flowchart/parser/flow.spec.js b/src/diagrams/flowchart/parser/flow.spec.js index a1aec2949..2d08f7d83 100644 --- a/src/diagrams/flowchart/parser/flow.spec.js +++ b/src/diagrams/flowchart/parser/flow.spec.js @@ -1391,6 +1391,16 @@ describe('when parsing ', function() { expect(edges.length).toBe(0); expect(vert['a'].type).toBe('diamond'); }); + it('should handle a single diamond node with whitespace after it', function() { + // Silly but syntactically correct + const res = flow.parser.parse('graph TD;a{A} ;'); + + const vert = flow.parser.yy.getVertices(); + const edges = flow.parser.yy.getEdges(); + + expect(edges.length).toBe(0); + expect(vert['a'].type).toBe('diamond'); + }); it('should handle a single diamond node with html in it', function() { // Silly but syntactically correct const res = flow.parser.parse('graph TD;a{A
end};');