Files
novalon-website/config/test/lighthouserc.json
T
zhangxiang 5a4d3106ca chore(test): harden e2e/lighthouse tooling and ignore tool cache
- Playwright:firefox/webkit 使用空 storageState,消除 newContext 阶段浏览器
  兼容噪声;路径以配置目录为基准兼容多种调用方式
- Lighthouse:lighthouserc 补 chromeFlags(--disable-crash-reporter --no-sandbox
  --headless=new),规避 TRAE 沙箱对 Crashpad 目录的拦截
- .gitignore:忽略 .impeccable 评审工具缓存
2026-08-19 14:43:53 +08:00

49 lines
1.5 KiB
JSON

{
"ci": {
"collect": {
"numberOfRuns": 3,
"startServerCommand": "npm run start",
"startServerReadyPattern": "Local:",
"url": [
"http://localhost:3000/",
"http://localhost:3000/about",
"http://localhost:3000/services",
"http://localhost:3000/products",
"http://localhost:3000/cases",
"http://localhost:3000/news",
"http://localhost:3000/contact"
],
"settings": {
"preset": "desktop",
"chromeFlags": ["--disable-crash-reporter", "--no-sandbox", "--headless=new"],
"onlyCategories": [
"performance",
"accessibility",
"best-practices",
"seo"
]
}
},
"assert": {
"assertions": {
"categories:performance": ["error", {"minScore": 0.9}],
"categories:accessibility": ["error", {"minScore": 0.9}],
"categories:best-practices": ["error", {"minScore": 0.9}],
"categories:seo": ["error", {"minScore": 0.9}],
"first-contentful-paint": ["error", {"maxNumericValue": 2000}],
"largest-contentful-paint": ["error", {"maxNumericValue": 3000}],
"cumulative-layout-shift": ["error", {"maxNumericValue": 0.1}],
"total-blocking-time": ["error", {"maxNumericValue": 300}],
"speed-index": ["error", {"maxNumericValue": 3000}]
}
},
"upload": {
"target": "temporary-public-storage"
},
"settings": {
"output": "html",
"outputPath": "lighthouse-reports"
}
}
}