File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,11 +80,10 @@ export class TestRepository implements vscode.Disposable {
8080
8181 // Get specs from configuration
8282 const allConfigSpecs = this . convertPathString ( config . specs )
83- if ( allConfigSpecs . length === 0 ) {
83+ if ( ! filePaths || filePaths . length === 0 ) {
8484 for ( const [ fileId ] of this . _fileMap . entries ( ) ) {
8585 this . removeSpecFileById ( fileId )
8686 }
87- return
8887 }
8988 // Filter specs to only include those that match the provided file paths
9089 const specsToReload =
Original file line number Diff line number Diff line change @@ -292,16 +292,12 @@ describe('TestRepository', () => {
292292 } )
293293
294294 it ( 'should handle empty file paths array' , async ( ) => {
295- // Setup
296- const removeSpecFileSpy = sandbox . spy ( testRepository , 'removeSpecFile' )
297-
298295 // Execute
299296 await testRepository . reloadSpecFiles ( [ ] )
300297
301298 // Verify
302299 expect ( readSpecsStub ) . to . have . been . calledWithExactly ( { specs : [ mockSpecPath , mockSpecPath2 ] } )
303- expect ( removeSpecFileSpy ) . to . have . been . calledWith ( mockSpecPath )
304- expect ( removeSpecFileSpy ) . to . have . been . calledWith ( mockSpecPath2 )
300+
305301 expect ( log . debug ) . to . have . been . calledWith ( 'Reloading 2 spec files' )
306302 expect ( log . debug ) . to . have . been . calledWith ( 'Successfully reloaded 2 spec files' )
307303 } )
You can’t perform that action at this time.
0 commit comments