// Disable SvelteKit hover-prefetch (both data + code) in browser-mode tests. // ADR-012 / #553. // // Hover-prefetch fires real fetch requests for route loader chunks; those // requests go through the same Playwright route handler that serves mocked // modules. An in-flight prefetch landing after iframe teardown can hit the // route handler with a closed birpc channel, raising an unhandled rejection // that exits the run with code 1 even when every individual test was green. // // `data-sveltekit-preload-data="off"` disables loader-data prefetch; // `data-sveltekit-preload-code="off"` disables route-code chunk prefetch. // Both surfaces can produce late module fetches that hit the route handler. document.body.dataset.sveltekitPreloadData = 'off'; document.body.dataset.sveltekitPreloadCode = 'off';