675 B29 lines
Blame
1import { parser } from './parser/exampleDiagram.jison';
2import * as db from './exampleDiagramDb.js';
3import { injectUtils } from './mermaidUtils.js';
4// Todo fix utils functions for tests
5import {
6 log,
7 setLogLevel,
8 getConfig,
9 sanitizeText,
10 setupGraphViewBox,
11} from '../../mermaid/src/diagram-api/diagramAPI.js';
12
13injectUtils(log, setLogLevel, getConfig, sanitizeText, setupGraphViewBox);
14
15describe('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