aboutsummaryrefslogtreecommitdiff
path: root/test/fixtures/translator-test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-28 07:22:47 -0500
committerGitHub <noreply@github.com>2024-01-28 12:22:47 +0000
commitacc013a1a8051d34322f0f5f91d7bdecc0a18843 (patch)
tree601344b2f047f395548ddfb16a83319af10464f9 /test/fixtures/translator-test.js
parenta51f1ab2dc675a49bfeeb08cc24b97eb8d888e4a (diff)
JapaneseUtil refactor (#555)
* Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions
Diffstat (limited to 'test/fixtures/translator-test.js')
-rw-r--r--test/fixtures/translator-test.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/fixtures/translator-test.js b/test/fixtures/translator-test.js
index f162972d..6562931c 100644
--- a/test/fixtures/translator-test.js
+++ b/test/fixtures/translator-test.js
@@ -26,7 +26,6 @@ import {createDictionaryArchive} from '../../dev/util.js';
import {AnkiNoteDataCreator} from '../../ext/js/data/sandbox/anki-note-data-creator.js';
import {DictionaryDatabase} from '../../ext/js/dictionary/dictionary-database.js';
import {DictionaryImporter} from '../../ext/js/dictionary/dictionary-importer.js';
-import {JapaneseUtil} from '../../ext/js/language/sandbox/japanese-util.js';
import {Translator} from '../../ext/js/language/translator.js';
import {chrome, fetch} from '../mocks/common.js';
import {DictionaryImporterMediaLoader} from '../mocks/dictionary-importer-media-loader.js';
@@ -65,14 +64,13 @@ async function createTranslatorContext(dictionaryDirectory, dictionaryName) {
expect(errors.length).toEqual(0);
// Setup translator
- const japaneseUtil = new JapaneseUtil(null);
- const translator = new Translator({japaneseUtil, database: dictionaryDatabase});
+ const translator = new Translator({database: dictionaryDatabase});
/** @type {import('deinflector').ReasonsRaw} */
const deinflectionReasons = parseJson(readFileSync(deinflectionReasonsPath, {encoding: 'utf8'}));
translator.prepare(deinflectionReasons);
// Assign properties
- const ankiNoteDataCreator = new AnkiNoteDataCreator(japaneseUtil);
+ const ankiNoteDataCreator = new AnkiNoteDataCreator();
return {translator, ankiNoteDataCreator};
}