@@ -25,6 +25,7 @@ import { QueryRunner } from "../../../src/queryRunner";
2525import { CompletedQueryInfo } from "../../../src/query-results" ;
2626import { SELECT_QUERY_NAME } from "../../../src/contextual/locationFinder" ;
2727import { createMockCommandManager } from "../../__mocks__/commandsMock" ;
28+ import { LocalQueries } from "../../../src/local-queries" ;
2829
2930jest . setTimeout ( 20_000 ) ;
3031
@@ -36,6 +37,7 @@ describeWithCodeQL()("Queries", () => {
3637 let databaseManager : DatabaseManager ;
3738 let cli : CodeQLCliServer ;
3839 let qs : QueryRunner ;
40+ let localQueries : LocalQueries ;
3941 const progress = jest . fn ( ) ;
4042 let token : CancellationToken ;
4143 let ctx : ExtensionContext ;
@@ -50,6 +52,7 @@ describeWithCodeQL()("Queries", () => {
5052 databaseManager = extension . databaseManager ;
5153 cli = extension . cliServer ;
5254 qs = extension . qs ;
55+ localQueries = extension . localQueries ;
5356 cli . quiet = true ;
5457 ctx = extension . ctx ;
5558 qlpackFile = `${ ctx . storageUri ?. fsPath } /quick-queries/qlpack.yml` ;
@@ -132,7 +135,7 @@ describeWithCodeQL()("Queries", () => {
132135
133136 async function runQueryWithExtensions ( ) {
134137 const result = new CompletedQueryInfo (
135- await qs . compileAndRunQueryAgainstDatabase (
138+ await localQueries . compileAndRunQueryAgainstDatabase (
136139 dbItem ,
137140 await mockInitialQueryInfo ( queryUsingExtensionPath ) ,
138141 join ( tmpDir . name , "mock-storage-path" ) ,
@@ -162,7 +165,7 @@ describeWithCodeQL()("Queries", () => {
162165
163166 it ( "should run a query" , async ( ) => {
164167 const queryPath = join ( __dirname , "data" , "simple-query.ql" ) ;
165- const result = qs . compileAndRunQueryAgainstDatabase (
168+ const result = localQueries . compileAndRunQueryAgainstDatabase (
166169 dbItem ,
167170 await mockInitialQueryInfo ( queryPath ) ,
168171 join ( tmpDir . name , "mock-storage-path" ) ,
@@ -178,7 +181,7 @@ describeWithCodeQL()("Queries", () => {
178181 it ( "should restart the database and run a query" , async ( ) => {
179182 await commands . executeCommand ( "codeQL.restartQueryServer" ) ;
180183 const queryPath = join ( __dirname , "data" , "simple-query.ql" ) ;
181- const result = await qs . compileAndRunQueryAgainstDatabase (
184+ const result = await localQueries . compileAndRunQueryAgainstDatabase (
182185 dbItem ,
183186 await mockInitialQueryInfo ( queryPath ) ,
184187 join ( tmpDir . name , "mock-storage-path" ) ,
0 commit comments