diff --git a/package-lock.json b/package-lock.json index e3d1877..34f8352 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@vue/compiler-sfc": "^3.5.0", "@vue/test-utils": "^2.5.1", "eslint": "^10.13.0", - "happy-dom": "^20.14.6", + "happy-dom": "^21.0.3", "sass": "^1.105.2", "typescript": "^6.0.3", "vite": "^7.3.7", @@ -5279,9 +5279,9 @@ "license": "ISC" }, "node_modules/happy-dom": { - "version": "20.14.6", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.14.6.tgz", - "integrity": "sha512-5DDsf4QmEIlRL6NkCv/fxSjYHHkZceL/IaYQdJc2h3G7DRTEai++VTjbfL0LB9geW2VrA3+vrjF3Efx+OTtX0Q==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-21.0.3.tgz", + "integrity": "sha512-PesNgu5BnIEmAwzKGewB3K1ORFeznFZJ4JrRz89ea1wkHnxskdpzX9sN/+zb4KO6k8oSMhyJSj/cwXAFrYBBNA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index ec2e121..28125e9 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@vue/compiler-sfc": "^3.5.0", "@vue/test-utils": "^2.5.1", "eslint": "^10.13.0", - "happy-dom": "^20.14.6", + "happy-dom": "^21.0.3", "sass": "^1.105.2", "typescript": "^6.0.3", "vite": "^7.3.7", diff --git a/vitest.config.ts b/vitest.config.ts index 018b301..549d063 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,6 +7,11 @@ export default defineConfig({ test: { globals: true, environment: 'happy-dom', + // happy-dom 21 makes iframe page loading opt-in, which leaves + // iframes without a contentWindow; the editor-frame tests need one. + environmentOptions: { + happyDOM: { settings: { enableIframePageLoading: true } }, + }, // @nextcloud/files@3 (aliased as -legacy) imports a named export from // the CJS-only `cancelable-promise`; let Vite transform it instead of // loading it as native ESM.