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.
This commit is contained in:
2026-10-10 16:11:35 +02:00
parent a578ddabda
commit 85963b19ef

View File

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