@@ -178,7 +178,7 @@ describe('collectFiles', () => {
178178 } ) ;
179179
180180 describe ( 'no paths specified' , ( ) => {
181- it ( 'should collect all changed files using git add .' , async ( ) => {
181+ it ( 'should not collect changed files using git add .' , async ( ) => {
182182 const testDir = path . join ( process . cwd ( ) , 'test-all-changes-temp' ) ;
183183
184184 try {
@@ -196,15 +196,10 @@ describe('collectFiles', () => {
196196 fs . writeFileSync ( path . join ( testDir , 'existing.txt' ) , 'modified' ) ;
197197 fs . writeFileSync ( path . join ( testDir , 'new.txt' ) , 'new content' ) ;
198198
199- // Call without paths - should add all changes
199+ // Call without paths - should not add all changes
200200 const result = await collectFiles ( undefined , testDir ) ;
201201
202- assert . strictEqual ( result . length , 2 ) ;
203- assert . ok ( result . some ( ( f ) => f . path === 'existing.txt' ) ) ;
204- assert . ok ( result . some ( ( f ) => f . path === 'new.txt' ) ) ;
205-
206- const modifiedFile = result . find ( ( f ) => f . path === 'existing.txt' ) ;
207- assert . strictEqual ( modifiedFile ?. content , 'modified' ) ;
202+ assert . strictEqual ( result . length , 0 ) ;
208203 } finally {
209204 if ( fs . existsSync ( testDir ) ) {
210205 fs . rmSync ( testDir , { recursive : true , force : true } ) ;
@@ -236,36 +231,6 @@ describe('collectFiles', () => {
236231 }
237232 }
238233 } ) ;
239-
240- it ( 'should handle renamed files correctly' , async ( ) => {
241- const testDir = path . join ( process . cwd ( ) , 'test-rename-temp' ) ;
242-
243- try {
244- fs . mkdirSync ( testDir , { recursive : true } ) ;
245- initGitRepo ( testDir ) ;
246-
247- const { execSync } = require ( 'node:child_process' ) ;
248-
249- // Create and commit initial file
250- fs . writeFileSync ( path . join ( testDir , 'old-name.txt' ) , 'content' ) ;
251- execSync ( 'git add old-name.txt' , { cwd : testDir , stdio : 'ignore' } ) ;
252- execSync ( 'git commit -m "initial"' , { cwd : testDir , stdio : 'ignore' } ) ;
253-
254- // Rename file
255- fs . renameSync ( path . join ( testDir , 'old-name.txt' ) , path . join ( testDir , 'new-name.txt' ) ) ;
256-
257- // Call without paths - should handle rename
258- const result = await collectFiles ( undefined , testDir ) ;
259-
260- // Git stages both the deletion and addition
261- assert . ok ( result . length >= 1 ) ;
262- assert . ok ( result . some ( ( f ) => f . path === 'new-name.txt' ) ) ;
263- } finally {
264- if ( fs . existsSync ( testDir ) ) {
265- fs . rmSync ( testDir , { recursive : true , force : true } ) ;
266- }
267- }
268- } ) ;
269234 } ) ;
270235
271236 describe ( 'specific paths' , ( ) => {
0 commit comments