@@ -45,6 +45,11 @@ describe('query-history', () => {
4545 let tryOpenExternalFile : Function ;
4646 let sandbox : sinon . SinonSandbox ;
4747
48+ let allHistory : QueryHistoryInfo [ ] ;
49+ let localQueryHistory : LocalQueryInfo [ ] ;
50+ let remoteQueryHistory : RemoteQueryHistoryItem [ ] ;
51+ let variantAnalysisHistory : VariantAnalysisHistoryItem [ ] ;
52+
4853 beforeEach ( ( ) => {
4954 sandbox = sinon . createSandbox ( ) ;
5055
@@ -80,6 +85,27 @@ describe('query-history', () => {
8085 removeVariantAnalysis : sandbox . stub ( ) ,
8186 showView : sandbox . stub ( ) ,
8287 } as any as VariantAnalysisManager ;
88+
89+ localQueryHistory = [
90+ createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , true ) ) ,
91+ createMockLocalQuery ( 'b' , createMockQueryWithResults ( sandbox , true ) ) ,
92+ createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , false ) ) ,
93+ createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , true ) ) ,
94+ ] ;
95+ remoteQueryHistory = [
96+ createMockRemoteQueryHistoryItem ( { } ) ,
97+ createMockRemoteQueryHistoryItem ( { } ) ,
98+ createMockRemoteQueryHistoryItem ( { } ) ,
99+ createMockRemoteQueryHistoryItem ( { } )
100+ ] ;
101+ variantAnalysisHistory = [
102+ createMockVariantAnalysisHistoryItem ( ) ,
103+ createMockVariantAnalysisHistoryItem ( ) ,
104+ createMockVariantAnalysisHistoryItem ( ) ,
105+ createMockVariantAnalysisHistoryItem ( )
106+ ] ;
107+ allHistory = shuffleHistoryItems ( [ ...localQueryHistory , ...remoteQueryHistory , ...variantAnalysisHistory ] ) ;
108+
83109 } ) ;
84110
85111 afterEach ( async ( ) => {
@@ -131,33 +157,6 @@ describe('query-history', () => {
131157 } ) ;
132158 } ) ;
133159
134- let allHistory : QueryHistoryInfo [ ] ;
135- let localQueryHistory : LocalQueryInfo [ ] ;
136- let remoteQueryHistory : RemoteQueryHistoryItem [ ] ;
137- let variantAnalysisHistory : VariantAnalysisHistoryItem [ ] ;
138-
139- beforeEach ( ( ) => {
140- localQueryHistory = [
141- createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , true ) ) ,
142- createMockLocalQuery ( 'b' , createMockQueryWithResults ( sandbox , true ) ) ,
143- createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , false ) ) ,
144- createMockLocalQuery ( 'a' , createMockQueryWithResults ( sandbox , true ) ) ,
145- ] ;
146- remoteQueryHistory = [
147- createMockRemoteQueryHistoryItem ( { } ) ,
148- createMockRemoteQueryHistoryItem ( { } ) ,
149- createMockRemoteQueryHistoryItem ( { } ) ,
150- createMockRemoteQueryHistoryItem ( { } )
151- ] ;
152- variantAnalysisHistory = [
153- createMockVariantAnalysisHistoryItem ( ) ,
154- createMockVariantAnalysisHistoryItem ( ) ,
155- createMockVariantAnalysisHistoryItem ( ) ,
156- createMockVariantAnalysisHistoryItem ( )
157- ] ;
158- allHistory = shuffleHistoryItems ( [ ...localQueryHistory , ...remoteQueryHistory , ...variantAnalysisHistory ] ) ;
159- } ) ;
160-
161160 describe ( 'Local Queries' , ( ) => {
162161 describe ( 'findOtherQueryToCompare' , ( ) => {
163162 it ( 'should find the second query to compare when one is selected' , async ( ) => {
0 commit comments