@@ -9,12 +9,7 @@ import * as sinon from "sinon";
99import * as actionsUtil from "./actions-util" ;
1010import * as api from "./api-client" ;
1111import { CachingKind } from "./caching-utils" ;
12- import {
13- CodeQL ,
14- getCachedCodeQL ,
15- PackDownloadOutput ,
16- setCodeQL ,
17- } from "./codeql" ;
12+ import { CodeQL , getCachedCodeQL , setCodeQL } from "./codeql" ;
1813import * as configUtils from "./config-utils" ;
1914import { Feature } from "./feature-flags" ;
2015import * as gitUtils from "./git-utils" ;
@@ -130,11 +125,7 @@ test("load empty config", async (t) => {
130125 const logger = getRunnerLogger ( true ) ;
131126 const languages = "javascript,python" ;
132127
133- const codeql = setCodeQL ( {
134- async packDownload ( ) : Promise < PackDownloadOutput > {
135- return { packs : [ ] } ;
136- } ,
137- } ) ;
128+ const codeql = setCodeQL ( { } ) ;
138129
139130 const config = await configUtils . initConfig (
140131 createTestInitConfigInputs ( {
@@ -164,11 +155,7 @@ test("loading config saves config", async (t) => {
164155 return await withTmpDir ( async ( tempDir ) => {
165156 const logger = getRunnerLogger ( true ) ;
166157
167- const codeql = setCodeQL ( {
168- async packDownload ( ) : Promise < PackDownloadOutput > {
169- return { packs : [ ] } ;
170- } ,
171- } ) ;
158+ const codeql = setCodeQL ( { } ) ;
172159
173160 // Sanity check the saved config file does not already exist
174161 t . false ( fs . existsSync ( configUtils . getPathToParsedConfigFile ( tempDir ) ) ) ;
@@ -285,11 +272,7 @@ test("load non-existent input", async (t) => {
285272
286273test ( "load non-empty input" , async ( t ) => {
287274 return await withTmpDir ( async ( tempDir ) => {
288- const codeql = setCodeQL ( {
289- async packDownload ( ) : Promise < PackDownloadOutput > {
290- return { packs : [ ] } ;
291- } ,
292- } ) ;
275+ const codeql = setCodeQL ( { } ) ;
293276
294277 // Just create a generic config object with non-default values for all fields
295278 const inputFileContents = `
@@ -374,11 +357,7 @@ test("Using config input and file together, config input should be used.", async
374357
375358 fs . mkdirSync ( path . join ( tempDir , "foo" ) ) ;
376359
377- const codeql = setCodeQL ( {
378- async packDownload ( ) : Promise < PackDownloadOutput > {
379- return { packs : [ ] } ;
380- } ,
381- } ) ;
360+ const codeql = setCodeQL ( { } ) ;
382361
383362 // Only JS, python packs will be ignored
384363 const languagesInput = "javascript" ;
@@ -400,11 +379,7 @@ test("Using config input and file together, config input should be used.", async
400379
401380test ( "API client used when reading remote config" , async ( t ) => {
402381 return await withTmpDir ( async ( tempDir ) => {
403- const codeql = setCodeQL ( {
404- async packDownload ( ) : Promise < PackDownloadOutput > {
405- return { packs : [ ] } ;
406- } ,
407- } ) ;
382+ const codeql = setCodeQL ( { } ) ;
408383
409384 const inputFileContents = `
410385 name: my config
@@ -505,9 +480,6 @@ test("No detected languages", async (t) => {
505480 async resolveLanguages ( ) {
506481 return { } ;
507482 } ,
508- async packDownload ( ) : Promise < PackDownloadOutput > {
509- return { packs : [ ] } ;
510- } ,
511483 } ) ;
512484
513485 try {
0 commit comments