@@ -40,8 +40,12 @@ describe('crossFileContextUtil', function () {
4040 tempFolder = ( await createTestWorkspaceFolder ( ) ) . uri . fsPath
4141 } )
4242
43+ afterEach ( async function ( ) {
44+ sinon . restore ( )
45+ } )
46+
4347 it ( 'for control group, should return opentabs context where there will be 3 chunks and each chunk should contains 50 lines' , async function ( ) {
44- sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . alwaysReturned ( 'control' )
48+ sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . returns ( 'control' )
4549 await toTextEditor ( aStringWithLineCount ( 200 ) , 'CrossFile.java' , tempFolder , { preview : false } )
4650 const myCurrentEditor = await toTextEditor ( '' , 'TargetFile.java' , tempFolder , {
4751 preview : false ,
@@ -317,7 +321,7 @@ describe('crossFileContextUtil', function () {
317321
318322 fileExtLists . forEach ( ( fileExt ) => {
319323 it ( 'should be non empty' , async function ( ) {
320- sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . alwaysReturned ( 'control' )
324+ sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . returns ( 'control' )
321325 const editor = await toTextEditor ( 'content-1' , `file-1.${ fileExt } ` , tempFolder )
322326 await toTextEditor ( 'content-2' , `file-2.${ fileExt } ` , tempFolder , { preview : false } )
323327 await toTextEditor ( 'content-3' , `file-3.${ fileExt } ` , tempFolder , { preview : false } )
0 commit comments