refactor(web): 界面工具 - 代码优化,替换重复的复制、打包、项目选择和主题切换实现
删除未再引用的文字扫光组件。复制提示、压缩包读写、项目多选和主题揭示的对外行为保持不变。
This commit is contained in:
1 parent
12125e18f6
commit
6195d8d4f7
7 files changed
+264
-425
No files matched your search
@@ -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("");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user