Attempt to fix qlpack test

This commit is contained in:
shati-patel
2021-09-08 11:38:59 +01:00
committed by Shati Patel
parent 4c81cdec98
commit a9dcb2d705

View File

@@ -46,12 +46,12 @@ describe('Use cli', function() {
it('should resolve query packs', async function() { it('should resolve query packs', async function() {
skipIfNoCodeQL(this); skipIfNoCodeQL(this);
const qlpacks = await cli.resolveQlpacks(getOnDiskWorkspaceFolders()); const qlpacks = await cli.resolveQlpacks(getOnDiskWorkspaceFolders());
// should have a bunch of qlpacks. just check that a few known ones exist // Depending on the version of the CLI, the qlpacks may have different names
expect(qlpacks['codeql-cpp']).not.to.be.undefined; // (e.g. "codeql/javascript-all" vs "codeql-javascript"),
expect(qlpacks['codeql-csharp']).not.to.be.undefined; // so we just check that the expected languages are included.
expect(qlpacks['codeql-java']).not.to.be.undefined; for (const expectedLanguage of ['cpp', 'csharp', 'go', 'java', 'javascript', 'python']) {
expect(qlpacks['codeql-javascript']).not.to.be.undefined; expect((Object.keys(qlpacks)).includes(expectedLanguage));
expect(qlpacks['codeql-python']).not.to.be.undefined; }
}); });
it('should resolve languages', async function() { it('should resolve languages', async function() {