@@ -333,7 +333,7 @@ describe('RecommendationService', () => {
333333 }
334334 } )
335335
336- it ( 'should not make completion request when edit suggestion is active' , async ( ) => {
336+ it ( 'should make completion request when edit suggestion is active' , async ( ) => {
337337 // Mock EditSuggestionState to return true (edit suggestion is active)
338338 const isEditSuggestionActiveStub = sandbox . stub ( EditSuggestionState , 'isEditSuggestionActive' ) . returns ( true )
339339
@@ -360,8 +360,8 @@ describe('RecommendationService', () => {
360360 const completionCalls = cs . filter ( ( c ) => c . firstArg === completionApi )
361361 const editCalls = cs . filter ( ( c ) => c . firstArg === editApi )
362362
363- assert . strictEqual ( cs . length , 1 ) // Only edit call
364- assert . strictEqual ( completionCalls . length , 0 ) // No completion calls
363+ assert . strictEqual ( cs . length , 2 ) // Only edit call
364+ assert . strictEqual ( completionCalls . length , 1 ) // No completion calls
365365 assert . strictEqual ( editCalls . length , 1 ) // One edit call
366366
367367 // Verify the stub was called
@@ -370,10 +370,6 @@ describe('RecommendationService', () => {
370370
371371 it ( 'should make completion request when edit suggestion is not active' , async ( ) => {
372372 // Mock EditSuggestionState to return false (no edit suggestion active)
373- const isEditSuggestionActiveStub = sandbox
374- . stub ( EditSuggestionState , 'isEditSuggestionActive' )
375- . returns ( false )
376-
377373 const mockResult = {
378374 sessionId : 'test-session' ,
379375 items : [ mockInlineCompletionItemOne ] ,
@@ -400,9 +396,6 @@ describe('RecommendationService', () => {
400396 assert . strictEqual ( cs . length , 2 ) // Both calls
401397 assert . strictEqual ( completionCalls . length , 1 ) // One completion call
402398 assert . strictEqual ( editCalls . length , 1 ) // One edit call
403-
404- // Verify the stub was called
405- sinon . assert . calledOnce ( isEditSuggestionActiveStub )
406399 } )
407400 } )
408401} )
0 commit comments