mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 14:08:47 +00:00
39 lines
915 B
TypeScript
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()
|
|
})
|
|
})
|