resolve db import in info.spec.ts

This commit is contained in:
Yokozuna59 2023-06-14 22:23:31 +03:00
parent d6bd59c46e
commit bf346ea155
1 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,10 @@
// @ts-ignore - jison doesn't export types
import { parser } from './parser/info.jison';
import infoDb from './infoDb.js';
import { db } from './infoDb.js';
describe('info graph', () => {
beforeEach(() => {
parser.yy = infoDb;
parser.yy = db;
parser.yy.clear();
});
@ -12,13 +12,13 @@ describe('info graph', () => {
const str = `info`;
parser.parse(str);
expect(infoDb.getInfo()).toBeFalsy();
expect(db.getInfo()).toBeFalsy();
});
it('should handle an info definition with showInfo', () => {
const str = `info showInfo`;
parser.parse(str);
expect(infoDb.getInfo()).toBeTruthy();
expect(db.getInfo()).toBeTruthy();
});
});