mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
* feat: chart color * fix * fix * fix: chart color * chore: changeset * chore: restore directory registry formatting * feat: add fontHeading * feat: rebuild registry * fix: v0 * refactor * fix * fix * fix * fix * fix * fix: refactor preset handling * fix * fix * fix
22 lines
625 B
TypeScript
22 lines
625 B
TypeScript
import { describe, expect, it } from "vitest"
|
|
|
|
import { parseDesignSystemConfig } from "./parse-config"
|
|
|
|
describe("parseDesignSystemConfig", () => {
|
|
it("honors explicit fontHeading and chartColor overrides when a preset is present", () => {
|
|
const result = parseDesignSystemConfig(
|
|
new URLSearchParams(
|
|
"preset=a0&fontHeading=playfair-display&chartColor=emerald"
|
|
)
|
|
)
|
|
|
|
expect(result.success).toBe(true)
|
|
if (!result.success) {
|
|
throw new Error(result.error)
|
|
}
|
|
|
|
expect(result.data.fontHeading).toBe("playfair-display")
|
|
expect(result.data.chartColor).toBe("emerald")
|
|
})
|
|
})
|