Better dependency version assertions
This commit is contained in:
@@ -404,9 +404,17 @@ describe("Variant Analysis Manager", () => {
|
||||
|
||||
// Assume the first dependency to check is the core library.
|
||||
if (dependenciesToCheck.length > 0) {
|
||||
expect(
|
||||
qlpackContents.dependencies?.[dependenciesToCheck[0]],
|
||||
).not.toEqual("${workspace}");
|
||||
const dependencyVersion =
|
||||
qlpackContents.dependencies?.[dependenciesToCheck[0]];
|
||||
|
||||
// There should be a version specified.
|
||||
expect(dependencyVersion).toBeDefined();
|
||||
|
||||
// Any `${workspace}` placeholder should have been replaced.
|
||||
// The actual version might be `*` (for the legacy code path where we replace workspace
|
||||
// references with `*`) or a specific version (for the new code path where the CLI does all
|
||||
// the work).
|
||||
expect(dependencyVersion).not.toEqual("${workspace}");
|
||||
}
|
||||
const qlpackLockContents = load(
|
||||
packFS.fileContents("codeql-pack.lock.yml").toString("utf-8"),
|
||||
|
||||
Reference in New Issue
Block a user