UNPKG

mermaid

Version:

Markdownish syntax for generating flowcharts

13 lines 1.65 kB
[ { "tags": [], "description": { "full": "Created by knut on 14-11-23.", "summary": "Created by knut on 14-11-23.", "body": "" }, "isPrivate": false, "ignore": false, "code": "describe('when detecting chart type ',function() {\n var utils = require('./utils');\n beforeEach(function () {\n\n });\n\n it('should handle a sequence defintion', function () {\n str = 'sequence TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('sequence');\n });\n it('should handle a sequence defintion with leading spaces', function () {\n str = ' sequence TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('sequence');\n });\n\n it('should handle a graph defintion', function () {\n str = 'graph TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('graph');\n });\n it('should handle a graph defintion with leading spaces', function () {\n str = ' graph TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('graph');\n });\n\n it('should handle a graph defintion with leading spaces and newline', function () {\n str = ' \\n graph TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('graph');\n });\n it('should handle a sequence defintion with leading spaces and newline', function () {\n str = ' \\n sequence TB\\nbfs1:queue';\n\n var type = utils.detectType(str);\n expect(type).toBe('sequence');\n });\n});" } ]