| 1 | import { parser } from './parser/exampleDiagram.jison'; |
| 2 | import * as db from './exampleDiagramDb.js'; |
| 3 | import { injectUtils } from './mermaidUtils.js'; |
| 4 | // Todo fix utils functions for tests |
| 5 | import { |
| 6 | log, |
| 7 | setLogLevel, |
| 8 | getConfig, |
| 9 | sanitizeText, |
| 10 | setupGraphViewBox, |
| 11 | } from '../../mermaid/src/diagram-api/diagramAPI.js'; |
| 12 | |
| 13 | injectUtils(log, setLogLevel, getConfig, sanitizeText, setupGraphViewBox); |
| 14 | |
| 15 | describe('when parsing an info graph it', function () { |
| 16 | let ex; |
| 17 | beforeEach(function () { |
| 18 | ex = parser; |
| 19 | ex.yy = db; |
| 20 | }); |
| 21 | |
| 22 | it('should handle an example-diagram definition', function () { |
| 23 | let str = `example-diagram |
| 24 | showInfo`; |
| 25 | |
| 26 | ex.parse(str); |
| 27 | }); |
| 28 | }); |
| 29 | |