mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 18:24:33 +01:00
Merge pull request #4378 from aloisklink/fix/fix-broken-unit-tests
test: fix classDiagramGrammer unit test
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
import { readFile } from 'node:fs/promises';
|
import { readFile } from 'node:fs/promises';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
// @ts-ignore - no types
|
// @ts-ignore - no types
|
||||||
import { LALRGenerator } from 'jison';
|
import { LALRGenerator } from 'jison';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
const getAbsolutePath = (relativePath: string) => {
|
const getAbsolutePath = (relativePath: string) => {
|
||||||
return new URL(path.join(__dirname, relativePath)).pathname;
|
return fileURLToPath(new URL(relativePath, import.meta.url));
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('class diagram grammar', function () {
|
describe('class diagram grammar', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user