@@ -102,15 +102,12 @@ const nullProgressReporter: ProgressReporter = {
102102jest . setTimeout ( 20_000 ) ;
103103
104104describeWithCodeQL ( ) ( "using the new query server" , ( ) => {
105- let testContext : any ;
106-
107- beforeAll ( ( ) => {
108- testContext = { } ;
109- } ) ;
110-
111105 let qs : qsClient . QueryServerClient ;
112106 let cliServer : cli . CodeQLCliServer ;
113107 let db : string ;
108+
109+ let supportNewQueryServer = true ;
110+
114111 beforeAll ( async ( ) => {
115112 const extension = await extensions
116113 . getExtension < CodeQLExtensionInterface | Record < string , never > > (
@@ -122,7 +119,7 @@ describeWithCodeQL()("using the new query server", () => {
122119
123120 cliServer . quiet = true ;
124121 if ( ! ( await cliServer . cliConstraints . supportsNewQueryServerForTests ( ) ) ) {
125- testContext . ctx . skip ( ) ;
122+ supportNewQueryServer = false ;
126123 }
127124 qs = new QueryServerClient (
128125 {
@@ -176,6 +173,10 @@ describeWithCodeQL()("using the new query server", () => {
176173 const parsedResults = new Checkpoint < void > ( ) ;
177174
178175 it ( "should register the database" , async ( ) => {
176+ if ( ! supportNewQueryServer ) {
177+ return ;
178+ }
179+
179180 await qs . sendRequest (
180181 messages . registerDatabases ,
181182 { databases : [ db ] } ,
@@ -187,6 +188,10 @@ describeWithCodeQL()("using the new query server", () => {
187188 } ) ;
188189
189190 it ( `should be able to run query ${ queryName } ` , async ( ) => {
191+ if ( ! supportNewQueryServer ) {
192+ return ;
193+ }
194+
190195 try {
191196 const params : messages . RunQueryParams = {
192197 db,
@@ -214,6 +219,10 @@ describeWithCodeQL()("using the new query server", () => {
214219
215220 const actualResultSets : ResultSets = { } ;
216221 it ( `should be able to parse results of query ${ queryName } ` , async ( ) => {
222+ if ( ! supportNewQueryServer ) {
223+ return ;
224+ }
225+
217226 await evaluationSucceeded . done ( ) ;
218227 const info = await cliServer . bqrsInfo ( RESULTS_PATH ) ;
219228
@@ -228,6 +237,10 @@ describeWithCodeQL()("using the new query server", () => {
228237 } ) ;
229238
230239 it ( `should have correct results for query ${ queryName } ` , async ( ) => {
240+ if ( ! supportNewQueryServer ) {
241+ return ;
242+ }
243+
231244 await parsedResults . done ( ) ;
232245 expect ( actualResultSets ! ) . not . toHaveLength ( 0 ) ;
233246 expect ( Object . keys ( actualResultSets ! ) . sort ( ) ) . toEqual (
0 commit comments