import { expect, test } from "vitest" import { transform } from "../../src/utils/transformers" import stone from "../fixtures/colors/stone.json" test("transform css vars", async () => { expect( await transform({ filename: "test.ts", raw: `import * as React from "react" export function Foo() { return
foo
}" `, config: { tsx: true, tailwind: { baseColor: "stone", cssVariables: true, }, aliases: { components: "@/components", utils: "@/lib/utils", }, }, baseColor: stone, }) ).toMatchSnapshot() expect( await transform({ filename: "test.ts", raw: `import * as React from "react" export function Foo() { return
foo
}" `, config: { tsx: true, tailwind: { baseColor: "stone", cssVariables: false, }, aliases: { components: "@/components", utils: "@/lib/utils", }, }, baseColor: stone, }) ).toMatchSnapshot() expect( await transform({ filename: "test.ts", raw: `import * as React from "react" export function Foo() { return
foo
}" `, config: { tsx: true, tailwind: { baseColor: "stone", cssVariables: false, }, aliases: { components: "@/components", utils: "@/lib/utils", }, }, baseColor: stone, }) ).toMatchSnapshot() expect( await transform({ filename: "test.ts", raw: `import * as React from "react" export function Foo() { return
foo
}" `, config: { tsx: true, tailwind: { baseColor: "stone", cssVariables: false, }, aliases: { components: "@/components", utils: "@/lib/utils", }, }, baseColor: stone, }) ).toMatchSnapshot() })