@@ -58,6 +58,7 @@ describe('Remote queries and query history manager', function() {
5858 await copyHistoryState ( ) ;
5959
6060 sandbox = sinon . createSandbox ( ) ;
61+ disposables = new DisposableBucket ( ) ;
6162
6263 localQueriesResultsViewStub = {
6364 showResults : sandbox . stub ( )
@@ -81,19 +82,6 @@ describe('Remote queries and query history manager', function() {
8182 onVariantAnalysisStatusUpdated : sandbox . stub ( ) ,
8283 onVariantAnalysisRemoved : sandbox . stub ( )
8384 } as any as VariantAnalysisManager ;
84- } ) ;
85-
86- afterEach ( function ( ) {
87- // set a higher timeout since recursive delete below may take a while, expecially on Windows.
88- this . timeout ( 120000 ) ;
89- deleteHistoryState ( ) ;
90- disposables . dispose ( testDisposeHandler ) ;
91- sandbox . restore ( ) ;
92- } ) ;
93-
94- beforeEach ( ( ) => {
95- sandbox = sinon . createSandbox ( ) ;
96- disposables = new DisposableBucket ( ) ;
9785
9886 rawQueryHistory = fs . readJSONSync ( path . join ( STORAGE_DIR , 'workspace-query-history.json' ) ) . queries ;
9987 remoteQueryResult0 = fs . readJSONSync ( path . join ( STORAGE_DIR , 'queries' , rawQueryHistory [ 0 ] . queryId , 'query-result.json' ) ) ;
@@ -123,6 +111,14 @@ describe('Remote queries and query history manager', function() {
123111 openTextDocumentSpy = sandbox . spy ( workspace , 'openTextDocument' ) ;
124112 } ) ;
125113
114+ afterEach ( function ( ) {
115+ // set a higher timeout since recursive delete below may take a while, expecially on Windows.
116+ this . timeout ( 120000 ) ;
117+ deleteHistoryState ( ) ;
118+ disposables . dispose ( testDisposeHandler ) ;
119+ sandbox . restore ( ) ;
120+ } ) ;
121+
126122 it ( 'should read query history' , async ( ) => {
127123 await qhm . readQueryHistory ( ) ;
128124
0 commit comments