From 1e1a7eeb58bb23d60b72b0b9ed780d43c2681ac6 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 16:03:21 +0800 Subject: fix(frontend): Set filter 改展开为 array,守门测试回绿 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lib/mobileCss.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src') diff --git a/frontend/src/lib/mobileCss.test.ts b/frontend/src/lib/mobileCss.test.ts index 43e0924..33e064c 100644 --- a/frontend/src/lib/mobileCss.test.ts +++ b/frontend/src/lib/mobileCss.test.ts @@ -58,7 +58,7 @@ describe('round5 守门:无自定义选择器(tailwind 工具类除外)', it('src/pages 90+ 处 class 全部是 tailwind 工具类(无 legacy 组件类名)', () => { const tokens = new Set(); for (const src of pageSources) for (const c of extractClasses(src)) tokens.add(c); - const offenders = tokens.filter((c) => legacy.some((l) => c === l.slice(1) || c.startsWith(l))); + const offenders = [...tokens].filter((c) => legacy.some((l) => c === l.slice(1) || c.startsWith(l))); // data-testid 属性不是 class;tailwind 任意值与变体直接放行 expect(offenders).toEqual([]); }); -- cgit v1.2.3