Files
shadcn-ui/packages/cli/test/utils/schema/registry-resolve-items-tree.test.ts
2024-08-19 16:37:35 +04:00

39 lines
915 B
TypeScript

import { describe, expect, test } from "vitest"
import { registryResolveItemsTree } from "../../../src/utils/registry"
describe("registryResolveItemTree", () => {
test("should resolve items tree", async () => {
expect(
await registryResolveItemsTree(["button"], {
style: "new-york",
tailwind: {
baseColor: "stone",
},
})
).toMatchSnapshot()
})
test("should resolve multiple items tree", async () => {
expect(
await registryResolveItemsTree(["button", "input", "command"], {
style: "default",
tailwind: {
baseColor: "zinc",
},
})
).toMatchSnapshot()
})
test("should resolve index", async () => {
expect(
await registryResolveItemsTree(["index", "label"], {
style: "default",
tailwind: {
baseColor: "zinc",
},
})
).toMatchSnapshot()
})
})