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 } }, + }, }, })