summaryrefslogtreecommitdiff
path: root/test/utilities
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-31 08:38:30 -0500
committerGitHub <noreply@github.com>2024-01-31 13:38:30 +0000
commit87ed7c8affd3ade9d3cd2d9ed1a61dd5f224e473 (patch)
treebe727294e31ef21e8a3f634734610e69e4a155ac /test/utilities
parent3e419aa562aab03ca20421aaf7e4d1a39194a5b4 (diff)
Module refactoring (#588)
* Convert PronunciationGenerator into static functions * Convert DictionaryDataUtil into static functions * Convert AnkiNoteDataCreator into static functions * Convert MediaUtil into static functions * Convert RegexUtil into static functions * Convert StringUtil into static functions * Convert ArrayBufferUtil into static functions * Convert AnkiUtil into static functions * Convert PermissionsUtil into static functions * Convert ProfileConditionsUtil into static functions
Diffstat (limited to 'test/utilities')
-rw-r--r--test/utilities/anki.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/utilities/anki.js b/test/utilities/anki.js
index e30d578f..69f4ce8b 100644
--- a/test/utilities/anki.js
+++ b/test/utilities/anki.js
@@ -16,16 +16,16 @@
*/
import {AnkiNoteBuilder} from '../../ext/js/data/anki-note-builder.js';
+import {createAnkiNoteData} from '../../ext/js/data/sandbox/anki-note-data-creator.js';
import {AnkiTemplateRenderer} from '../../ext/js/templates/sandbox/anki-template-renderer.js';
/**
- * @param {import('../../ext/js/data/sandbox/anki-note-data-creator.js').AnkiNoteDataCreator} ankiNoteDataCreator
* @param {import('dictionary').DictionaryEntry} dictionaryEntry
* @param {import('settings').ResultOutputMode} mode
* @returns {import('anki-templates').NoteData}
* @throws {Error}
*/
-export function createTestAnkiNoteData(ankiNoteDataCreator, dictionaryEntry, mode) {
+export function createTestAnkiNoteData(dictionaryEntry, mode) {
const marker = '{marker}';
/** @type {import('anki-templates-internal').CreateDetails} */
const data = {
@@ -43,7 +43,7 @@ export function createTestAnkiNoteData(ankiNoteDataCreator, dictionaryEntry, mod
},
media: {}
};
- return ankiNoteDataCreator.create(marker, data);
+ return createAnkiNoteData(marker, data);
}
/**