From f4759e330ede8869796041fdd4ac3d7f067f5fff Mon Sep 17 00:00:00 2001 From: Harald Wartig Date: Wed, 18 Nov 2026 20:23:29 +0100 Subject: [PATCH] test: ignore tracker URLs in console error text A blocked Vercel insights script logs on the page URL, so the URL filter missed it. Claude-Session: https://claude.ai/code/session_012Z3BugmXXwtieQ8h7j91xn --- __checks__/no-console-errors.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__checks__/no-console-errors.spec.ts b/__checks__/no-console-errors.spec.ts index 4e71a9f5..ce69157d 100644 --- a/__checks__/no-console-errors.spec.ts +++ b/__checks__/no-console-errors.spec.ts @@ -22,7 +22,8 @@ for (const path of paths) { const errors: string[] = [] page.on('pageerror', (error) => errors.push(`pageerror: ${error.message}`)) page.on('console', (message) => { - if (message.type() === 'error' && !isIgnored(message.location().url)) { + // A blocked script logs on the page's URL and names the script only in the text. + if (message.type() === 'error' && !isIgnored(message.location().url) && !isIgnored(message.text())) { errors.push(`console.error: ${message.text()} @ ${message.location().url}`) } })