update-css-vars.test.ts — ui Source File
Architecture documentation for update-css-vars.test.ts, a typescript file in the ui codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a4f8ac42_6df6_4a5d_9e11_18e8114a4567["update-css-vars.test.ts"] 09244f5d_7fce_b385_220b_05945bb9e93b["update-css-vars.ts"] a4f8ac42_6df6_4a5d_9e11_18e8114a4567 --> 09244f5d_7fce_b385_220b_05945bb9e93b 80c1c0cd_6316_f919_46c4_1f1c0a4b93f1["isColorValue"] a4f8ac42_6df6_4a5d_9e11_18e8114a4567 --> 80c1c0cd_6316_f919_46c4_1f1c0a4b93f1 989639e5_72dc_2426_39e9_5a75ddec4756["isLocalHSLValue"] a4f8ac42_6df6_4a5d_9e11_18e8114a4567 --> 989639e5_72dc_2426_39e9_5a75ddec4756 4b9d28e9_450c_12b3_5ef0_44434fa9535b["transformCssVars"] a4f8ac42_6df6_4a5d_9e11_18e8114a4567 --> 4b9d28e9_450c_12b3_5ef0_44434fa9535b c8d55bee_7008_1e1f_317b_8dc47b31b6a8["vitest"] a4f8ac42_6df6_4a5d_9e11_18e8114a4567 --> c8d55bee_7008_1e1f_317b_8dc47b31b6a8 style a4f8ac42_6df6_4a5d_9e11_18e8114a4567 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, test } from "vitest"
import {
isColorValue,
isLocalHSLValue,
transformCssVars,
} from "../../../src/utils/updaters/update-css-vars"
describe("transformCssVars", () => {
test("should add light and dark css vars if not present", async () => {
expect(
await transformCssVars(
`@tailwind base;
@tailwind components;
@tailwind utilities;
`,
{
light: {
background: "white",
foreground: "black",
},
dark: {
background: "black",
foreground: "white",
},
},
{
tailwind: {
cssVariables: true,
},
}
)
).toMatchInlineSnapshot(`
"@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: white;
--foreground: black
}
.dark {
--background: black;
--foreground: white
}
}
"
`)
})
test("should update light and dark css vars if present", async () => {
expect(
await transformCssVars(
`@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base{
:root{
// ... (1167 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does update-css-vars.test.ts do?
update-css-vars.test.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain.
What does update-css-vars.test.ts depend on?
update-css-vars.test.ts imports 5 module(s): isColorValue, isLocalHSLValue, transformCssVars, update-css-vars.ts, vitest.
Where is update-css-vars.test.ts in the architecture?
update-css-vars.test.ts is located at packages/shadcn/test/utils/updaters/update-css-vars.test.ts (domain: FrameworkTooling, directory: packages/shadcn/test/utils/updaters).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free