mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-22 12:15:43 +00:00
* feat(cli): add zero-config support for Next.js * chore: add changeset * feat(cli): add preflight
34 lines
763 B
TypeScript
34 lines
763 B
TypeScript
import path from "path"
|
|
import { describe, expect, test } from "vitest"
|
|
|
|
import { getTailwindCssFile } from "../../src/utils/get-project-info"
|
|
|
|
describe("get tailwind css file", async () => {
|
|
test.each([
|
|
{
|
|
name: "next-app",
|
|
file: "app/globals.css",
|
|
},
|
|
{
|
|
name: "next-app-src",
|
|
file: "src/app/styles.css",
|
|
},
|
|
{
|
|
name: "next-pages",
|
|
file: "styles/globals.css",
|
|
},
|
|
{
|
|
name: "next-pages-src",
|
|
file: "src/styles/globals.css",
|
|
},
|
|
{
|
|
name: "t3-app",
|
|
file: "src/styles/globals.css",
|
|
},
|
|
])(`getTailwindCssFile($name) -> $file`, async ({ name, file }) => {
|
|
expect(
|
|
await getTailwindCssFile(path.resolve(__dirname, `../fixtures/${name}`))
|
|
).toBe(file)
|
|
})
|
|
})
|