declare const process: { cwd(): string }; declare function require(name: string): { readFileSync?: (path: string, encoding: string) => string; join?: (...parts: string[]) => string; }; const { readFileSync } = require("node:fs"); const { join } = require("node:path"); if (!readFileSync || !join) { throw new Error("测试运行环境缺少文件读取能力"); } const root = process.cwd(); const css = readFileSync(join(root, "src/assets/styles.css"), "utf-8"); const statCard = readFileSync(join(root, "src/components/StatCard.vue"), "utf-8"); const compactPages = [ "DashboardView.vue", "CommissionsView.vue", "ConfigCenterView.vue", "UsersView.vue", "OperationLogsView.vue", "PayrollView.vue", ]; for (const page of compactPages) { const view = readFileSync(join(root, "src/views", page), "utf-8"); assertIncludes(view, "summary-strip", `${page} 应使用紧凑摘要条`); assertNotIncludes(view, "