MCPcopy
hub / github.com/shadcn-ui/ui / createInitializedMonorepoProject

Function createInitializedMonorepoProject

packages/tests/src/tests/apply.test.ts:39–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39async function createInitializedMonorepoProject() {
40 const rootDir = path.join(
41 os.tmpdir(),
42 `shadcn-apply-monorepo-${process.pid}-${Date.now()}`
43 )
44 const projectName = `test-apply-monorepo-${process.pid}`
45 await fs.ensureDir(rootDir)
46 const result = await npxShadcn(
47 rootDir,
48 [
49 "init",
50 "--name",
51 projectName,
52 "-t",
53 "vite",
54 "--monorepo",
55 "--preset",
56 "nova",
57 "--base",
58 "radix",
59 ],
60 {
61 timeout: 300000,
62 }
63 )
64
65 expect(result.exitCode).toBe(0)
66
67 return {
68 projectPath: path.join(rootDir, projectName),
69 rootDir,
70 }
71}
72
73async function createInitializedRadixProject() {
74 const fixturePath = await createFixtureTestDirectory("next-app")

Callers 1

apply.test.tsFile · 0.85

Calls 1

npxShadcnFunction · 0.90

Tested by

no test coverage detected