lighthouse
Some checks failed
deploy to production / lighthouse-evaluation (push) Failing after 1s
deploy to production / deploy (push) Failing after 28s

This commit is contained in:
2023-12-26 12:45:24 +00:00
parent edfca1f007
commit 8184ffecf4
20 changed files with 613 additions and 125 deletions

View File

@@ -0,0 +1,16 @@
var { setUpQuery, calculateAverageDynamically, run } = require("../lib/utils")
;(function () {
let subPaths = context.db.find("lighthouseSubpath")
let urls = []
for (let i = 0; i < subPaths.length; i++) {
urls.push(setUpQuery(subPaths[i].lighthouseSubpath))
}
let dbObjs = []
urls.forEach((url) => {
console.log("URL:", url)
dbObjs.push(run(url))
})
let dbObject = calculateAverageDynamically(dbObjs)
dbObject.analyzedPaths = [...subPaths].map((subPath) => subPath.lighthouseSubpath)
return { data: dbObject }
})()