Fix bug where details and carbon data were overwritten in runner.js

This commit is contained in:
2025-12-29 12:54:59 +11:00
parent b8463d74ff
commit 5820a87919

View File

@@ -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`);