Skip to content

Commit a9dcb2d

Browse files
committed
Attempt to fix qlpack test
1 parent 4c81cde commit a9dcb2d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

extensions/ql-vscode/src/vscode-tests/cli-integration/run-cli.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ describe('Use cli', function() {
4646
it('should resolve query packs', async function() {
4747
skipIfNoCodeQL(this);
4848
const qlpacks = await cli.resolveQlpacks(getOnDiskWorkspaceFolders());
49-
// should have a bunch of qlpacks. just check that a few known ones exist
50-
expect(qlpacks['codeql-cpp']).not.to.be.undefined;
51-
expect(qlpacks['codeql-csharp']).not.to.be.undefined;
52-
expect(qlpacks['codeql-java']).not.to.be.undefined;
53-
expect(qlpacks['codeql-javascript']).not.to.be.undefined;
54-
expect(qlpacks['codeql-python']).not.to.be.undefined;
49+
// Depending on the version of the CLI, the qlpacks may have different names
50+
// (e.g. "codeql/javascript-all" vs "codeql-javascript"),
51+
// so we just check that the expected languages are included.
52+
for (const expectedLanguage of ['cpp', 'csharp', 'go', 'java', 'javascript', 'python']) {
53+
expect((Object.keys(qlpacks)).includes(expectedLanguage));
54+
}
5555
});
5656

5757
it('should resolve languages', async function() {

0 commit comments

Comments
 (0)