mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix SyntaxError in runner.js - allow summary reassignment
This commit is contained in:
@@ -157,7 +157,7 @@ async function _executeTest(url, options) {
|
|||||||
const getScore = (cat) => (lhr.categories && lhr.categories[cat] && lhr.categories[cat].score) ? lhr.categories[cat].score * 100 : 0;
|
const getScore = (cat) => (lhr.categories && lhr.categories[cat] && lhr.categories[cat].score) ? lhr.categories[cat].score * 100 : 0;
|
||||||
const getMetric = (aud) => (lhr.audits && lhr.audits[aud] && lhr.audits[aud].numericValue) ? lhr.audits[aud].numericValue : 0;
|
const getMetric = (aud) => (lhr.audits && lhr.audits[aud] && lhr.audits[aud].numericValue) ? lhr.audits[aud].numericValue : 0;
|
||||||
|
|
||||||
const summary = {
|
let summary = {
|
||||||
id: testId,
|
id: testId,
|
||||||
url: lhr.finalUrl || url,
|
url: lhr.finalUrl || url,
|
||||||
timestamp: lhr.fetchTime || new Date().toISOString(),
|
timestamp: lhr.fetchTime || new Date().toISOString(),
|
||||||
@@ -223,7 +223,7 @@ async function _executeTest(url, options) {
|
|||||||
// Use High-Res frames if available, otherwise fallback to Lighthouse thumbnails
|
// Use High-Res frames if available, otherwise fallback to Lighthouse thumbnails
|
||||||
const filmstripData = (highResFrames && highResFrames.length > 5) ? highResFrames : (lhr.audits['screenshot-thumbnails']?.details?.items || []);
|
const filmstripData = (highResFrames && highResFrames.length > 5) ? highResFrames : (lhr.audits['screenshot-thumbnails']?.details?.items || []);
|
||||||
|
|
||||||
const summary = {
|
summary = {
|
||||||
id: testId,
|
id: testId,
|
||||||
url: lhr.finalUrl || url,
|
url: lhr.finalUrl || url,
|
||||||
timestamp: lhr.fetchTime || new Date().toISOString(),
|
timestamp: lhr.fetchTime || new Date().toISOString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user