refactor(web): 界面工具 - 代码优化,替换重复的复制、打包、项目选择和主题切换实现

删除未再引用的文字扫光组件。复制提示、压缩包读写、项目多选和主题揭示的对外行为保持不变。
This commit is contained in:
ddcat666
2026-10-01 11:40:08 +08:00
parent 22e7331d04
commit 572bc341f0
7 changed files with 264 additions and 425 deletions

View File

@@ -0,0 +1,17 @@
import { describe, expect, test } from "bun:test";
import { cn } from "@/lib/utils";
describe("M9 clean-room utility contract", () => {
test("keeps conditional class values", () => {
expect(cn("root", false && "hidden", ["active", null], { selected: true, muted: false })).toBe("root active selected");
});
test("lets tailwind-merge resolve conflicting utilities", () => {
expect(cn("px-2", "px-6", "text-sm")).toBe("px-6 text-sm");
});
test("returns an empty string when no class is enabled", () => {
expect(cn(undefined, null, false)).toBe("");
});
});