@@ -10,7 +10,7 @@ import { CancellationTokenSource } from 'vscode-jsonrpc';
1010import * as messages from '../../src/messages' ;
1111import * as qsClient from '../../src/queryserver-client' ;
1212import * as cli from '../../src/cli' ;
13- import { ProgressReporter } from '../../src/logging' ;
13+ import { ProgressReporter , Logger } from '../../src/logging' ;
1414
1515
1616declare module "url" {
@@ -75,8 +75,8 @@ const queryTestCases: QueryTestCase[] = [
7575 }
7676] ;
7777
78- describe ( 'using the query server' , function ( ) {
79- before ( function ( ) {
78+ describe ( 'using the query server' , function ( ) {
79+ before ( function ( ) {
8080 if ( process . env [ "CODEQL_PATH" ] === undefined ) {
8181 console . log ( 'The environment variable CODEQL_PATH is not set. The query server tests, which require the CodeQL CLI, will be skipped.' ) ;
8282 this . skip ( ) ;
@@ -100,13 +100,14 @@ describe('using the query server', function () {
100100 }
101101 } ) ;
102102
103- it ( 'should be able to start the query server' , async function ( ) {
103+ it ( 'should be able to start the query server' , async function ( ) {
104104 const consoleProgressReporter : ProgressReporter = {
105- report : ( v : { message : string } ) => console . log ( `progress reporter says ${ v . message } ` )
105+ report : ( v : { message : string } ) => console . log ( `progress reporter says ${ v . message } ` )
106106 } ;
107- const logger = {
107+ const logger : Logger = {
108108 log : ( s : string ) => console . log ( 'logger says' , s ) ,
109- logWithoutTrailingNewline : ( s : string ) => console . log ( 'logger says' , s )
109+ logWithoutTrailingNewline : ( s : string ) => console . log ( 'logger says' , s ) ,
110+ show : ( ) => { } ,
110111 } ;
111112 cliServer = new cli . CodeQLCliServer ( {
112113 async getCodeQlPathWithoutVersionCheck ( ) : Promise < string | undefined > {
@@ -137,7 +138,7 @@ describe('using the query server', function () {
137138 const evaluationSucceeded = new Checkpoint < void > ( ) ;
138139 const parsedResults = new Checkpoint < void > ( ) ;
139140
140- it ( `should be able to compile query ${ queryName } ` , async function ( ) {
141+ it ( `should be able to compile query ${ queryName } ` , async function ( ) {
141142 await queryServerStarted . done ( ) ;
142143 expect ( fs . existsSync ( queryTestCase . queryPath ) ) . to . be . true ;
143144 try {
@@ -169,7 +170,7 @@ describe('using the query server', function () {
169170 }
170171 } ) ;
171172
172- it ( `should be able to run query ${ queryName } ` , async function ( ) {
173+ it ( `should be able to run query ${ queryName } ` , async function ( ) {
173174 try {
174175 await compilationSucceeded . done ( ) ;
175176 const callbackId = qs . registerCallback ( _res => {
@@ -201,7 +202,7 @@ describe('using the query server', function () {
201202 } ) ;
202203
203204 const actualResultSets : ResultSets = { } ;
204- it ( `should be able to parse results of query ${ queryName } ` , async function ( ) {
205+ it ( `should be able to parse results of query ${ queryName } ` , async function ( ) {
205206 let fileReader : FileReader | undefined ;
206207 try {
207208 await evaluationSucceeded . done ( ) ;
@@ -222,7 +223,7 @@ describe('using the query server', function () {
222223 }
223224 } ) ;
224225
225- it ( `should have correct results for query ${ queryName } ` , async function ( ) {
226+ it ( `should have correct results for query ${ queryName } ` , async function ( ) {
226227 await parsedResults . done ( ) ;
227228 expect ( actualResultSets ! ) . not . to . be . empty ;
228229 expect ( Object . keys ( actualResultSets ! ) . sort ( ) ) . to . eql ( Object . keys ( queryTestCase . expectedResultSets ) . sort ( ) ) ;
0 commit comments