From ae970705f13f9df0a5e6ab131ee600a7a5bfb018 Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Wed, 20 Mar 2024 15:23:25 -0400 Subject: [PATCH] use snap in puppeteer script --- scripts/puppeteer.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/puppeteer.ts b/scripts/puppeteer.ts index a6c0f58..43389f3 100644 --- a/scripts/puppeteer.ts +++ b/scripts/puppeteer.ts @@ -44,8 +44,12 @@ async function handleUrl(browser: Browser, url: string) { const pathname = new URL(url).pathname; console.time(pathname); - const path1 = await snap(browser, url, "base"); - const path2 = await snap(browser, url.replace(base, compare), "compare"); + const path1 = await snap(browser, `${url}?snap`, "base"); + const path2 = await snap( + browser, + `${url.replace(base, compare)}?snap`, + "compare", + ); const img1 = readScreenshot(path1); const img2 = readScreenshot(path2); const meta1 = await img1.metadata();