From 85963b19eff80530c301454095377cde1350621a Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Sat, 10 Oct 2026 16:11:35 +0200 Subject: [PATCH] test(16.2-06): keep happy-dom iframe pages offline in the editor tests The preview tests put payloads with remote URLs into the preview frame's srcdoc; happy-dom tried to load them (a DNS lookup of example.test on every run). Tests must not reach the network. --- vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index e6dfbe2..21e2681 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -31,5 +31,11 @@ export default defineConfig({ test: { environment: 'happy-dom', include: ['tests/**/*.test.ts'], + // Tests never reach the network: happy-dom must not load the pages of + // iframes (the preview frame's srcdoc holds test payloads with remote + // URLs). + environmentOptions: { + happyDOM: { settings: { disableIframePageLoading: true } }, + }, }, })