aboutsummaryrefslogtreecommitdiff
path: root/test/deinflector.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
commit338d210b66006189a0b775e8bd524c1cc11c2d9a (patch)
tree12fbd7eb03dcbb7ffcf270a1e7f9a8ee0cf53996 /test/deinflector.test.js
parent43bc4e3015a7b6c4f4941c4b6327a7445b356f1c (diff)
Update paths
Diffstat (limited to 'test/deinflector.test.js')
-rw-r--r--test/deinflector.test.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/deinflector.test.js b/test/deinflector.test.js
index 77184799..a69f8e56 100644
--- a/test/deinflector.test.js
+++ b/test/deinflector.test.js
@@ -20,6 +20,9 @@ import fs from 'fs';
import path from 'path';
import {describe, expect, test} from 'vitest';
import {Deinflector} from '../ext/js/language/deinflector.js';
+import {fileURLToPath} from 'node:url';
+
+const dirname = path.dirname(fileURLToPath(import.meta.url));
/**
* @param {Deinflector} deinflector
@@ -924,7 +927,7 @@ function testDeinflections() {
}
];
- const deinflectionReasons = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ext', 'data/deinflect.json'), {encoding: 'utf8'}));
+ const deinflectionReasons = JSON.parse(fs.readFileSync(path.join(dirname, '..', 'ext', 'data/deinflect.json'), {encoding: 'utf8'}));
const deinflector = new Deinflector(deinflectionReasons);
describe('deinflections', () => {