From 770054c8cef1e3ddfbdaf807e57520986a75425f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 1 Feb 2024 10:05:49 -0500 Subject: Fix dictionary data write (#607) --- test/dictionary-data.write.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') 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'})); -- cgit v1.2.3