Skip to content

Commit

Permalink
Fix path in test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreywolf committed May 4, 2023
1 parent bf37956 commit 221640a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { LALRGenerator } from 'jison';
import path from 'path';

const getAbsolutePath = (relativePath: string) => {
return new URL(path.join(path.dirname(import.meta.url), relativePath)).pathname;
return new URL(path.join(__dirname, relativePath)).pathname;
};

describe('class diagram grammar', function () {
it('should have no conflicts', async function () {
const grammarSource = await readFile(getAbsolutePath('./parser/classDiagram.jison'), 'utf8');
const grammarSource = await readFile(getAbsolutePath('parser/classDiagram.jison'), 'utf8');
const grammarParser = new LALRGenerator(grammarSource, {});
expect(grammarParser.conflicts).toBe(0);
});
Expand Down

0 comments on commit 221640a

Please sign in to comment.