Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import clsx from "./ClassesUtils";
|
||||
|
||||
describe("clsx", () => {
|
||||
it("should concatenate all truthy classes with a space", () => {
|
||||
const classes = ["class-1", "class-2", "", null, undefined, false, "class-3"];
|
||||
const result = clsx(...classes);
|
||||
expect(result).toEqual("class-1 class-2 class-3");
|
||||
});
|
||||
|
||||
it("should return an empty string if all classes are falsy", () => {
|
||||
const classes = ["", null, undefined, false];
|
||||
const result = clsx(...classes);
|
||||
expect(result).toEqual("");
|
||||
});
|
||||
|
||||
it("should return an empty string if no classes are provided", () => {
|
||||
const classes: any[] = [];
|
||||
const result = clsx(...classes);
|
||||
expect(result).toEqual("");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user