@@ -56,9 +56,8 @@ describe('CLI Core Commands', () => {
5656
5757 describe ( 'dry-run command' , ( ) => {
5858 it ( 'should preview configuration without creating files' , async ( ) => {
59- const output = execSync ( `node ${ CLI_PATH } dry-run nextjs-15 shadcn` , {
59+ const output = execSync ( `node ${ CLI_PATH } dry-run nextjs-15 shadcn --output " ${ testProjectDir } " ` , {
6060 encoding : 'utf-8' ,
61- cwd : testProjectDir ,
6261 } ) ;
6362
6463 expect ( output ) . toContain ( 'Dry Run - Configuration Preview' ) ;
@@ -80,9 +79,8 @@ describe('CLI Core Commands', () => {
8079
8180 it ( 'should detect invalid configuration names' , ( ) => {
8281 expect ( ( ) => {
83- execSync ( `node ${ CLI_PATH } dry-run invalid-config` , {
82+ execSync ( `node ${ CLI_PATH } dry-run invalid-config --output " ${ testProjectDir } " ` , {
8483 encoding : 'utf-8' ,
85- cwd : testProjectDir ,
8684 } ) ;
8785 } ) . toThrow ( ) ;
8886 } ) ;
@@ -145,8 +143,7 @@ describe('CLI Core Commands', () => {
145143 await fs . writeFile ( path . join ( claudeDir , 'test.txt' ) , 'existing content' ) ;
146144
147145 // Generate new config
148- const output = execSync ( `node ${ CLI_PATH } nextjs-15 ` , {
149- cwd : testProjectDir ,
146+ const output = execSync ( `node ${ CLI_PATH } nextjs-15 --output "${ testProjectDir } "` , {
150147 encoding : 'utf-8' ,
151148 } ) ;
152149
@@ -183,8 +180,7 @@ describe('CLI Core Commands', () => {
183180 describe ( 'validate command' , ( ) => {
184181 it ( 'should validate a properly generated configuration' , async ( ) => {
185182 // First generate a config
186- execSync ( `node ${ CLI_PATH } nextjs-15 shadcn ` , {
187- cwd : testProjectDir ,
183+ execSync ( `node ${ CLI_PATH } nextjs-15 shadcn --output "${ testProjectDir } "` , {
188184 encoding : 'utf-8' ,
189185 } ) ;
190186
@@ -245,8 +241,7 @@ describe('CLI Core Commands', () => {
245241
246242 it ( 'should handle missing configuration gracefully' , ( ) => {
247243 expect ( ( ) => {
248- execSync ( `node ${ CLI_PATH } non-existent-config ` , {
249- cwd : testProjectDir ,
244+ execSync ( `node ${ CLI_PATH } non-existent-config --output "${ testProjectDir } "` , {
250245 encoding : 'utf-8' ,
251246 } ) ;
252247 } ) . toThrow ( / U n k n o w n c o n f i g u r a t i o n / i) ;
0 commit comments