mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-21 06:53:17 +08:00
29 lines
675 B
JavaScript
29 lines
675 B
JavaScript
import { parser } from './parser/exampleDiagram.jison';
|
|
import * as db from './exampleDiagramDb.js';
|
|
import { injectUtils } from './mermaidUtils.js';
|
|
// Todo fix utils functions for tests
|
|
import {
|
|
log,
|
|
setLogLevel,
|
|
getConfig,
|
|
sanitizeText,
|
|
setupGraphViewBox,
|
|
} from '../../mermaid/src/diagram-api/diagramAPI.js';
|
|
|
|
injectUtils(log, setLogLevel, getConfig, sanitizeText, setupGraphViewBox);
|
|
|
|
describe('when parsing an info graph it', function () {
|
|
let ex;
|
|
beforeEach(function () {
|
|
ex = parser;
|
|
ex.yy = db;
|
|
});
|
|
|
|
it('should handle an example-diagram definition', function () {
|
|
let str = `example-diagram
|
|
showInfo`;
|
|
|
|
ex.parse(str);
|
|
});
|
|
});
|