From 5820a879191f6c4e29cd6edbf45c655d770e9d81 Mon Sep 17 00:00:00 2001 From: DeNNiiInc Date: Mon, 29 Dec 2025 12:54:59 +1100 Subject: [PATCH] Fix bug where details and carbon data were overwritten in runner.js --- lib/runner.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/runner.js b/lib/runner.js index 07984ec..4415551 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -251,25 +251,8 @@ async function _executeTest(url, options) { // Use High-Res frames if available, otherwise fallback to Lighthouse thumbnails const filmstripData = (highResFrames && highResFrames.length > 5) ? highResFrames : (lhr.audits['screenshot-thumbnails']?.details?.items || []); - summary = { - id: testId, - url: lhr.finalUrl || url, - timestamp: lhr.fetchTime || new Date().toISOString(), - scores: { - performance: getScore('performance'), - accessibility: getScore('accessibility'), - bestPractices: getScore('best-practices'), - seo: getScore('seo'), - }, - metrics: { - lcp: getMetric('largest-contentful-paint'), - cls: getMetric('cumulative-layout-shift'), - tbt: getMetric('total-blocking-time'), - }, - userAgent: lhr.userAgent, - isMobile: isMobile, - filmstrip: filmstripData - }; + // Update filmstrip in existing summary (preserves details and carbon) + summary.filmstrip = filmstripData; // Update summary file with new filmstrip jsonPath = path.join(reportDir, `${testId}.json`);