Skip to content

Commit d8fb227

Browse files
committed
Fix failing test
1 parent 767051e commit d8fb227

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

extensions/ql-vscode/test/vscode-tests/cli-integration/variant-analysis/variant-analysis-manager.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ describe("Variant Analysis Manager", () => {
319319
filesThatExist,
320320
qlxFilesThatExist,
321321
filesThatDoNotExist,
322-
dependenciesToCheck = ["codeql/java-all"],
322+
323+
// A subset of dependencies that we expect should be in the qlpack file.
324+
// The first dependency is assumed to be the core library.
325+
dependenciesToCheck = ["codeql/javascript-all"],
323326
checkVersion = true,
324327
}: {
325328
queryPath: string;
@@ -382,10 +385,13 @@ describe("Variant Analysis Manager", () => {
382385
if (checkVersion) {
383386
expect(qlpackContents.version).toEqual("0.0.0");
384387
}
385-
expect(qlpackContents.dependencies?.["codeql/javascript-all"]).toEqual(
386-
"*",
387-
);
388388

389+
// Assume the first dependency to check is the core library.
390+
if (dependenciesToCheck.length > 0) {
391+
expect(qlpackContents.dependencies?.[dependenciesToCheck[0]]).toEqual(
392+
"*",
393+
);
394+
}
389395
const qlpackLockContents = load(
390396
packFS.fileContents("codeql-pack.lock.yml").toString("utf-8"),
391397
);

0 commit comments

Comments
 (0)