Fix skipIfTrue
Also, update jsdoc for `resolveQlpacks`.
This commit is contained in:
@@ -1138,8 +1138,8 @@ export class CodeQLCliServer implements Disposable {
|
|||||||
/**
|
/**
|
||||||
* Gets information about available qlpacks
|
* Gets information about available qlpacks
|
||||||
* @param additionalPacks A list of directories to search for qlpacks before searching in `searchPath`.
|
* @param additionalPacks A list of directories to search for qlpacks before searching in `searchPath`.
|
||||||
* @param searchPath A list of directories to search for packs not found in `additionalPacks`. If undefined,
|
* @param extensionPacksOnly Whether to only search for extension packs. If true, only extension packs will
|
||||||
* the default CLI search path is used.
|
* be returned. If false, all packs will be returned.
|
||||||
* @returns A dictionary mapping qlpack name to the directory it comes from
|
* @returns A dictionary mapping qlpack name to the directory it comes from
|
||||||
*/
|
*/
|
||||||
async resolveQlpacks(
|
async resolveQlpacks(
|
||||||
|
|||||||
@@ -44,5 +44,9 @@ export function itWithCodeQL() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function skipIfTrue(condition: Thenable<boolean>) {
|
export async function skipIfTrue(condition: Thenable<boolean>) {
|
||||||
return (await condition) ? beforeEach(() => {}) : beforeEach.skip(() => {});
|
return beforeEach(async () => {
|
||||||
|
if (await condition) {
|
||||||
|
pending();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user