summaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/translator-test.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/test/fixtures/translator-test.js b/test/fixtures/translator-test.js
index 6b6eaad8..9f1e87df 100644
--- a/test/fixtures/translator-test.js
+++ b/test/fixtures/translator-test.js
@@ -17,12 +17,8 @@
*/
import {IDBKeyRange, indexedDB} from 'fake-indexeddb';
-import {readFileSync} from 'fs';
-import {fileURLToPath} from 'node:url';
-import {dirname, join} from 'path';
import {expect, vi} from 'vitest';
import {createDictionaryArchiveData} from '../../dev/dictionary-archive-util.js';
-import {parseJson} from '../../dev/json.js';
import {DictionaryDatabase} from '../../ext/js/dictionary/dictionary-database.js';
import {DictionaryImporter} from '../../ext/js/dictionary/dictionary-importer.js';
import {Translator} from '../../ext/js/language/translator.js';
@@ -30,9 +26,6 @@ import {chrome, fetch} from '../mocks/common.js';
import {DictionaryImporterMediaLoader} from '../mocks/dictionary-importer-media-loader.js';
import {createDomTest} from './dom-test.js';
-const extDir = join(dirname(fileURLToPath(import.meta.url)), '../../ext');
-const languageTransformDescriptorPath = join(extDir, 'js/language/ja/japanese-transforms.json');
-
vi.stubGlobal('indexedDB', indexedDB);
vi.stubGlobal('IDBKeyRange', IDBKeyRange);
vi.stubGlobal('fetch', fetch);
@@ -63,9 +56,7 @@ export async function createTranslatorContext(dictionaryDirectory, dictionaryNam
// Setup translator
const translator = new Translator(dictionaryDatabase);
- /** @type {import('language-transformer').LanguageTransformDescriptor} */
- const deinflectionReasons = parseJson(readFileSync(languageTransformDescriptorPath, {encoding: 'utf8'}));
- translator.prepare([deinflectionReasons]);
+ translator.prepare();
return translator;
}