@@ -44,7 +44,6 @@ describe('Variant Analyses and QueryHistoryManager', function() {
4444 let showTextDocumentSpy : sinon . SinonSpy ;
4545 let openTextDocumentSpy : sinon . SinonSpy ;
4646
47- let openRemoteQueryResultsStub : sinon . SinonStub ;
4847 let rehydrateVariantAnalysisStub : sinon . SinonStub ;
4948 let removeVariantAnalysisStub : sinon . SinonStub ;
5049 let showViewStub : sinon . SinonStub ;
@@ -66,14 +65,14 @@ describe('Variant Analyses and QueryHistoryManager', function() {
6665
6766 rehydrateVariantAnalysisStub = sandbox . stub ( ) ;
6867 removeVariantAnalysisStub = sandbox . stub ( ) ;
69- openRemoteQueryResultsStub = sandbox . stub ( ) ;
68+ showViewStub = sandbox . stub ( ) ;
7069
7170 remoteQueriesManagerStub = {
7271 onRemoteQueryAdded : sandbox . stub ( ) ,
7372 onRemoteQueryRemoved : sandbox . stub ( ) ,
7473 onRemoteQueryStatusUpdate : sandbox . stub ( ) ,
7574 rehydrateRemoteQuery : sandbox . stub ( ) ,
76- openRemoteQueryResults : openRemoteQueryResultsStub
75+ openRemoteQueryResults : sandbox . stub ( )
7776 } as any as RemoteQueriesManager ;
7877
7978 variantAnalysisManagerStub = {
@@ -137,7 +136,7 @@ describe('Variant Analyses and QueryHistoryManager', function() {
137136 // Remove the first variant analysis
138137 await qhm . handleRemoveHistoryItem ( qhm . treeDataProvider . allHistory [ 0 ] ) ;
139138
140- expect ( removeVariantAnalysisStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis . id . toString ( ) ) ;
139+ expect ( removeVariantAnalysisStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis ) ;
141140 expect ( rehydrateVariantAnalysisStub ) . to . have . callCount ( 2 ) ;
142141
143142 expect ( rehydrateVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 0 ] . variantAnalysis ) ;
@@ -146,7 +145,6 @@ describe('Variant Analyses and QueryHistoryManager', function() {
146145 expect ( rehydrateVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 1 ] . variantAnalysis ) ;
147146 expect ( rehydrateVariantAnalysisStub . getCall ( 1 ) . args [ 1 ] ) . to . deep . eq ( rawQueryHistory [ 1 ] . status ) ;
148147
149- expect ( openRemoteQueryResultsStub ) . calledOnceWithExactly ( rawQueryHistory [ 1 ] . variantAnalysis . id . toString ( ) ) ;
150148 expect ( qhm . treeDataProvider . allHistory ) . to . deep . eq ( rawQueryHistory . slice ( 1 ) ) ;
151149
152150 // Add it back to the history
@@ -164,8 +162,8 @@ describe('Variant Analyses and QueryHistoryManager', function() {
164162 await qhm . handleRemoveHistoryItem ( undefined ! , [ qhm . treeDataProvider . allHistory [ 1 ] , qhm . treeDataProvider . allHistory [ 0 ] ] ) ;
165163
166164 expect ( removeVariantAnalysisStub . callCount ) . to . eq ( 2 ) ;
167- expect ( removeVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 1 ] . variantAnalysis ) ;
168- expect ( removeVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 0 ] . variantAnalysis ) ;
165+ expect ( removeVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 1 ] . variantAnalysis ) ;
166+ expect ( removeVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 0 ] . variantAnalysis ) ;
169167 expect ( qhm . treeDataProvider . allHistory ) . to . deep . eq ( [ ] ) ;
170168
171169 // also, both queries should be removed from disk storage
@@ -179,7 +177,7 @@ describe('Variant Analyses and QueryHistoryManager', function() {
179177 await qhm . readQueryHistory ( ) ;
180178
181179 await qhm . handleItemClicked ( qhm . treeDataProvider . allHistory [ 0 ] , [ ] ) ;
182- expect ( showViewStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis . id . toString ( ) ) ;
180+ expect ( showViewStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis . id ) ;
183181 } ) ;
184182
185183 it ( 'should get the query text' , async ( ) => {
0 commit comments