mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
resolve db import in info.spec.ts
This commit is contained in:
parent
d6bd59c46e
commit
bf346ea155
@ -1,10 +1,10 @@
|
|||||||
// @ts-ignore - jison doesn't export types
|
// @ts-ignore - jison doesn't export types
|
||||||
import { parser } from './parser/info.jison';
|
import { parser } from './parser/info.jison';
|
||||||
import infoDb from './infoDb.js';
|
import { db } from './infoDb.js';
|
||||||
|
|
||||||
describe('info graph', () => {
|
describe('info graph', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
parser.yy = infoDb;
|
parser.yy = db;
|
||||||
parser.yy.clear();
|
parser.yy.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -12,13 +12,13 @@ describe('info graph', () => {
|
|||||||
const str = `info`;
|
const str = `info`;
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
|
|
||||||
expect(infoDb.getInfo()).toBeFalsy();
|
expect(db.getInfo()).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle an info definition with showInfo', () => {
|
it('should handle an info definition with showInfo', () => {
|
||||||
const str = `info showInfo`;
|
const str = `info showInfo`;
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
|
|
||||||
expect(infoDb.getInfo()).toBeTruthy();
|
expect(db.getInfo()).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user