aboutsummaryrefslogtreecommitdiff
path: root/test/fixtures/translator-test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-22 07:52:33 -0500
committerGitHub <noreply@github.com>2023-12-22 12:52:33 +0000
commit11d2b933be3f775fe1723a4a60452635b0aa6cfd (patch)
tree031d891983271e16ee3d662e02a27cb0f9e1cef4 /test/fixtures/translator-test.js
parentab847b124d418b13037b59f446b288ff435e66a4 (diff)
Dictionary data tests + write mode (#415)
* Rename test * Refactor * Create new dictionary-data.test.js * Move utility functions * Remove old tests * Slight refactor * Add command to rebuild test data * Clarify name * Don't expect in write mode * Ignore config file
Diffstat (limited to 'test/fixtures/translator-test.js')
-rw-r--r--test/fixtures/translator-test.js8
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;
}