mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-19 06:47:21 +00:00
- 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
32 lines
902 B
TypeScript
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",
|
|
);
|
|
});
|
|
});
|