diff options
Diffstat (limited to 'test/fixtures')
-rw-r--r-- | test/fixtures/translator-test.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/fixtures/translator-test.js b/test/fixtures/translator-test.js index 3304c587..0afbe1f0 100644 --- a/test/fixtures/translator-test.js +++ b/test/fixtures/translator-test.js @@ -90,8 +90,12 @@ export async function createTranslatorTest(htmlFilePath, dictionaryDirectory, di window: async ({window}, use) => { await use(window); }, // eslint-disable-next-line no-empty-pattern translator: async ({}, use) => { await use(translator); }, - // eslint-disable-next-line no-empty-pattern - ankiNoteDataCreator: async ({}, use) => { await use(ankiNoteDataCreator); } + ankiNoteDataCreator: async ({window}, use) => { + // The window property needs to be referenced for it to be initialized. + // It is needed for DOM access for structured content. + void window; + await use(ankiNoteDataCreator); + } }); return result; } |