diff options
Diffstat (limited to 'test/dictionary-data.write.js')
-rw-r--r-- | test/dictionary-data.write.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/dictionary-data.write.js b/test/dictionary-data.write.js index b27007e6..a6e14656 100644 --- a/test/dictionary-data.write.js +++ b/test/dictionary-data.write.js @@ -21,7 +21,7 @@ import path from 'path'; import {parseJson} from '../dev/json.js'; import {createTranslatorTest} from './fixtures/translator-test.js'; import {createTestAnkiNoteData, getTemplateRenderResults} from './utilities/anki.js'; -import {createFindOptions} from './utilities/translator.js'; +import {createFindKanjiOptions, createFindTermsOptions} from './utilities/translator.js'; /** * @param {string} fileName @@ -62,8 +62,7 @@ test('Write dictionary data expected data', async ({window, translator, expect}) case 'findTerms': { const {mode, text} = data; - /** @type {import('translation').FindTermsOptions} */ - const options = createFindOptions(dictionaryName, optionsPresets, data.options); + const options = createFindTermsOptions(dictionaryName, optionsPresets, data.options); const {dictionaryEntries, originalTextLength} = await translator.findTerms(mode, text, options); const renderResults = mode !== 'simple' ? await getTemplateRenderResults(dictionaryEntries, 'terms', mode, template, null) : null; const noteDataList = mode !== 'simple' ? dictionaryEntries.map((dictionaryEntry) => createTestAnkiNoteData(dictionaryEntry, mode)) : null; @@ -75,8 +74,7 @@ test('Write dictionary data expected data', async ({window, translator, expect}) case 'findKanji': { const {text} = data; - /** @type {import('translation').FindKanjiOptions} */ - const options = createFindOptions(dictionaryName, optionsPresets, data.options); + const options = createFindKanjiOptions(dictionaryName, optionsPresets, data.options); const dictionaryEntries = await translator.findKanji(text, options); const renderResults = await getTemplateRenderResults(dictionaryEntries, 'kanji', 'split', template, null); const noteDataList = dictionaryEntries.map((dictionaryEntry) => createTestAnkiNoteData(dictionaryEntry, 'split')); |