- e2e:修死选择器与蜜罐误命中、补断言、GA4/security-headers 用例诚实标注 skip 边界;新增 assert-helpers/fixtures/hydrated/primary-nav/touch-targets 等复用桩。 - 集成层:config/test/jest.integration.config.js + tests-integration/ 真库 一次性 SQLite 用例,teardown 守卫开发库指纹。 - 门禁工具链:jest.setup 归位到根、scripts/accessibility 全站 axe 节点计数、 check-brand-text-token/check-motion-constraints 机械守卫、stryker/lighthouse 配置收敛。
112 lines
4.7 KiB
JSON
112 lines
4.7 KiB
JSON
{
|
|
"ci": {
|
|
"collect": {
|
|
"numberOfRuns": 3,
|
|
"startServerCommand": "HOSTNAME=localhost PORT=3200 node dist/standalone/server.js",
|
|
"startServerReadyPattern": "Local:",
|
|
"url": [
|
|
"http://localhost:3200/",
|
|
"http://localhost:3200/about",
|
|
"http://localhost:3200/services",
|
|
"http://localhost:3200/products",
|
|
"http://localhost:3200/cases",
|
|
"http://localhost:3200/news",
|
|
"http://localhost:3200/contact",
|
|
"http://localhost:3200/products/erp-upgrade",
|
|
"http://localhost:3200/about/brand"
|
|
],
|
|
"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}],
|
|
|
|
"inspector-issues": ["error", {"minScore": 1}],
|
|
|
|
"aria-allowed-attr": ["error", {"minScore": 1}],
|
|
"aria-hidden-body": ["error", {"minScore": 1}],
|
|
"aria-required-attr": ["error", {"minScore": 1}],
|
|
"aria-required-children": ["error", {"minScore": 1}],
|
|
"aria-required-parent": ["error", {"minScore": 1}],
|
|
"aria-roles": ["error", {"minScore": 1}],
|
|
"aria-valid-attr": ["error", {"minScore": 1}],
|
|
"aria-valid-attr-value": ["error", {"minScore": 1}],
|
|
"duplicate-id-aria": ["error", {"minScore": 1}],
|
|
"button-name": ["error", {"minScore": 1}],
|
|
"image-alt": ["error", {"minScore": 1}],
|
|
"input-button-name": ["error", {"minScore": 1}],
|
|
"input-image-alt": ["error", {"minScore": 1}],
|
|
"label": ["error", {"minScore": 1}],
|
|
"select-name": ["error", {"minScore": 1}],
|
|
"meta-refresh": ["error", {"minScore": 1}],
|
|
"meta-viewport": ["error", {"minScore": 1}],
|
|
"video-caption": ["error", {"minScore": 1}],
|
|
|
|
"accesskeys": ["error", {"minScore": 1}],
|
|
"aria-command-name": ["error", {"minScore": 1}],
|
|
"aria-conditional-attr": ["error", {"minScore": 1}],
|
|
"aria-hidden-focus": ["error", {"minScore": 1}],
|
|
"aria-input-field-name": ["error", {"minScore": 1}],
|
|
"aria-meter-name": ["error", {"minScore": 1}],
|
|
"aria-progressbar-name": ["error", {"minScore": 1}],
|
|
"aria-prohibited-attr": ["error", {"minScore": 1}],
|
|
"aria-toggle-field-name": ["error", {"minScore": 1}],
|
|
"bypass": ["error", {"minScore": 1}],
|
|
"color-contrast": ["error", {"minScore": 1}],
|
|
"definition-list": ["error", {"minScore": 1}],
|
|
"dlitem": ["error", {"minScore": 1}],
|
|
"document-title": ["error", {"minScore": 1}],
|
|
"frame-title": ["error", {"minScore": 1}],
|
|
"html-has-lang": ["error", {"minScore": 1}],
|
|
"html-lang-valid": ["error", {"minScore": 1}],
|
|
"link-in-text-block": ["error", {"minScore": 1}],
|
|
"link-name": ["error", {"minScore": 1}],
|
|
"list": ["error", {"minScore": 1}],
|
|
"listitem": ["error", {"minScore": 1}],
|
|
"object-alt": ["error", {"minScore": 1}],
|
|
"tabindex": ["error", {"minScore": 1}],
|
|
"target-size": ["error", {"minScore": 1}],
|
|
"td-headers-attr": ["error", {"minScore": 1}],
|
|
"th-has-data-cells": ["error", {"minScore": 1}],
|
|
"valid-lang": ["error", {"minScore": 1}],
|
|
|
|
"heading-order": ["error", {"minScore": 1}],
|
|
"form-field-multiple-labels": ["warn", {"minScore": 1}],
|
|
"html-xml-lang-mismatch": ["warn", {"minScore": 1}],
|
|
"landmark-one-main": ["warn", {"minScore": 1}],
|
|
"skip-link": ["warn", {"minScore": 1}],
|
|
"aria-deprecated-role": ["warn", {"minScore": 1}],
|
|
"aria-dialog-name": ["warn", {"minScore": 1}],
|
|
"aria-text": ["warn", {"minScore": 1}],
|
|
"aria-treeitem-name": ["warn", {"minScore": 1}]
|
|
}
|
|
},
|
|
"upload": {
|
|
"target": "filesystem",
|
|
"outputDir": "lighthouse-reports",
|
|
"reportFilenamePattern": "%%PATHNAME%%-%%DATETIME%%.report.%%EXTENSION%%"
|
|
},
|
|
"settings": {
|
|
"output": ["html", "json"],
|
|
"outputPath": "lighthouse-reports"
|
|
}
|
|
}
|
|
}
|