diff options
Diffstat (limited to 'test/dictionary-data.test.js')
-rw-r--r-- | test/dictionary-data.test.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/dictionary-data.test.js b/test/dictionary-data.test.js index 9f8ba6f0..dcc03d72 100644 --- a/test/dictionary-data.test.js +++ b/test/dictionary-data.test.js @@ -22,7 +22,7 @@ import {describe} from 'vitest'; 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'; const dirname = path.dirname(fileURLToPath(import.meta.url)); const dictionaryName = 'Test Dictionary 2'; @@ -61,8 +61,7 @@ describe('Dictionary data', () => { 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, expect) : null; const noteDataList = mode !== 'simple' ? dictionaryEntries.map((dictionaryEntry) => createTestAnkiNoteData(dictionaryEntry, mode)) : null; @@ -75,8 +74,7 @@ describe('Dictionary data', () => { 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, expect); const noteDataList = dictionaryEntries.map((dictionaryEntry) => createTestAnkiNoteData(dictionaryEntry, 'split')); |