From c44d5a6e82fe171c5382bb88d623d74d445ff9c6 Mon Sep 17 00:00:00 2001 From: dsz Date: Tue, 24 Nov 2026 04:02:01 +0545 Subject: [PATCH] Do not report nomodule scripts as blocked resources heuristicFailures() reports every ', [ + 'https://example.com/app.js', + ]); + expect(heuristicFailures(win).failures).toEqual([{ host: 'ads.example.net', kind: 'script' }]); + }); + + it('does not report a nomodule script, which module-capable browsers never fetch', () => { + // Next.js and Vite's legacy plugin ship one on every page. + const win = pageWith( + '' + + '', + ['https://example.com/app.js'], + ); + expect(heuristicFailures(win).failures).toEqual([]); + }); +}); + describe('summarizeFailures', () => { it('groups by host and classifies first-party, third-party and ad/tracking resources', () => { const s = summarizeFailures(