mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-09 06:55:07 +00:00
18 lines
446 B
TypeScript
18 lines
446 B
TypeScript
import { describe, expect, it } from "vitest"
|
|
|
|
import { parsePresetInput } from "./parse-preset-input"
|
|
|
|
describe("parsePresetInput", () => {
|
|
it("accepts a raw preset code", () => {
|
|
expect(parsePresetInput("b0")).toBe("b0")
|
|
})
|
|
|
|
it("accepts a --preset flag", () => {
|
|
expect(parsePresetInput(" --preset b0 ")).toBe("b0")
|
|
})
|
|
|
|
it("rejects invalid preset input", () => {
|
|
expect(parsePresetInput("open sesame")).toBeNull()
|
|
})
|
|
})
|