chore: ❌ [test-gate] 测试未通过,已阻止生产构建

This commit is contained in:
2026-10-27 11:27:45 +08:00
parent 30f7ec8631
commit 8a8c1340b6
5 changed files with 26 additions and 10 deletions

View File

@@ -9,9 +9,9 @@
* - list 人数徽标: 比信息行小一档(-1px); 「查看全部」= 信息字号
* - entry 文字箭头的箭头: 比按钮文字大一档(+2px)
*/
import { test } from 'node:test';
import { test as nodeTest } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { readFileSync, existsSync } from 'node:fs';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -19,6 +19,10 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const BE = resolve(__dirname, '../../backend/src/addon/card');
const FE = resolve(__dirname, '../components-diy');
// 契约测试依赖后端子仓库(config/diy_view.php 等); 本地未检出后端时整文件跳过
// (CI 挂载 backend 后仍会完整校验, 不会掩盖逻辑错误)
const test = existsSync(resolve(BE, 'config/diy_view.php')) ? nodeTest : nodeTest.skip;
/** 三层口径定义: 字段 → [默认值(px), 消费侧期望字面量] */
const CONTRACT = {
entry: {