diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-01 10:05:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 15:05:49 +0000 |
commit | 770054c8cef1e3ddfbdaf807e57520986a75425f (patch) | |
tree | 6906d4fcbf5c6cd0fe2e205b378ab6cba4053811 /test/dictionary-data.write.js | |
parent | dfd42bad0b46845ad88d1fdc5fa82b4f03bab0f3 (diff) |
Fix dictionary data write (#607)
Diffstat (limited to 'test/dictionary-data.write.js')
-rw-r--r-- | test/dictionary-data.write.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/dictionary-data.write.js b/test/dictionary-data.write.js index d88bd3cd..b27007e6 100644 --- a/test/dictionary-data.write.js +++ b/test/dictionary-data.write.js @@ -35,7 +35,10 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); const dictionaryName = 'Test Dictionary 2'; const test = await createTranslatorTest(void 0, path.join(dirname, 'data/dictionaries/valid-dictionary1'), dictionaryName); -test('Write dictionary data expected data', async ({translator, expect}) => { +test('Write dictionary data expected data', async ({window, translator, expect}) => { + // The window property needs to be referenced for it to be initialized. + // It is needed for DOM access for structured content. + void window; const testInputsFilePath = path.join(dirname, 'data/translator-test-inputs.json'); /** @type {import('test/translator').TranslatorTestInputs} */ const {optionsPresets, tests} = parseJson(readFileSync(testInputsFilePath, {encoding: 'utf8'})); |