Import at the top

This commit is contained in:
Nikolay Rozhkov
2023-06-26 18:37:41 +03:00
parent a38733346f
commit b0825ebb35
2 changed files with 2 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
import diagram from './sankey-arrow.jison';
import { parser } from './sankey-arrow.jison';
import db from '../sankeyDB.js';
// import { fail } from 'assert';
describe('sankey-beta diagram', function () {
// TODO - these examples should be put into ./parser/stateDiagram.spec.js

View File

@@ -5,6 +5,8 @@ import { parser } from './sankey.jison';
import db from '../sankeyDB.js';
import { cleanupComments } from '../../../diagram-api/comments.js';
import { prepareTextForParsing } from '../sankeyUtils.js';
import * as fs from 'fs';
import * as path from 'path';
describe('Sankey diagram', function () {
describe('when parsing an info graph it', function () {
@@ -15,8 +17,6 @@ describe('Sankey diagram', function () {
});
it('parses csv', async () => {
const fs = await import('fs');
const path = await import('path');
const csv = path.resolve(__dirname, './energy.csv');
const data = fs.readFileSync(csv, 'utf8');
const graphDefinition = prepareTextForParsing(cleanupComments('sankey-beta\n\n ' + data));