Fix skipIfTrue

Also, update jsdoc for `resolveQlpacks`.
This commit is contained in:
Andrew Eisenberg
2023-02-13 14:30:29 -08:00
parent 6f435300e8
commit d8435d113a
2 changed files with 7 additions and 3 deletions

View File

@@ -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(

View File

@@ -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();
}
});
} }