diff options
Diffstat (limited to 'test/utilities')
-rw-r--r-- | test/utilities/anki.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/utilities/anki.js b/test/utilities/anki.js index 69f4ce8b..d0e095bd 100644 --- a/test/utilities/anki.js +++ b/test/utilities/anki.js @@ -144,7 +144,8 @@ export async function getTemplateRenderResults(dictionaryEntries, type, mode, te } break; } - const ankiNoteBuilder = new AnkiNoteBuilder(ankiTemplateRenderer.templateRenderer); + const api = new MinimalApi(); + const ankiNoteBuilder = new AnkiNoteBuilder(api, ankiTemplateRenderer.templateRenderer); const context = { url: 'url:', sentence: { @@ -186,3 +187,19 @@ export async function getTemplateRenderResults(dictionaryEntries, type, mode, te return results; } + +class MinimalApi { + /** + * @type {import('anki-note-builder.js').MinimalApi['injectAnkiNoteMedia']} + */ + async injectAnkiNoteMedia() { + throw new Error('Not supported'); + } + + /** + * @type {import('anki-note-builder.js').MinimalApi['parseText']} + */ + async parseText() { + throw new Error('Not supported'); + } +} |