AeThex-OS/temp-forge-extract/aethex-forge-main/client/lib/utils.spec.ts
MrPiglr b3c308b2c8 Add functional marketplace modules, bottom nav bar, root terminal, arcade games
- ModuleManager: Central tracking for installed marketplace modules
- DataAnalyzerWidget: Real-time CPU/RAM/Battery/Storage widget (unlocked by Data Analyzer module)
- BottomNavBar: Navigation bar for Projects/Chat/Marketplace/Settings
- RootShell: Real root command execution utility
- TerminalActivity: Full root shell with neofetch, sysinfo, real Linux commands
- Terminal Pro module: Adds aliases (ll, la, h), command history
- ArcadeActivity + SnakeGame: Pixel Arcade module unlocks retro games
- fade_in/fade_out animations for smooth transitions
2026-02-18 22:03:50 -07:00

32 lines
902 B
TypeScript

import { describe, it, expect } from "vitest";
import { cn } from "./utils";
describe("cn function", () => {
it("should merge classes correctly", () => {
expect(cn("text-red-500", "bg-blue-500")).toBe("text-red-500 bg-blue-500");
});
it("should handle conditional classes", () => {
const isActive = true;
expect(cn("base-class", isActive && "active-class")).toBe(
"base-class active-class",
);
});
it("should handle false and null conditions", () => {
const isActive = false;
expect(cn("base-class", isActive && "active-class", null)).toBe(
"base-class",
);
});
it("should merge tailwind classes properly", () => {
expect(cn("px-2 py-1", "px-4")).toBe("py-1 px-4");
});
it("should work with object notation", () => {
expect(cn("base", { conditional: true, "not-included": false })).toBe(
"base conditional",
);
});
});