Skip to content

Commit 3d178e0

Browse files
committed
fix: correct misleading mock
Mock analysis incorrectly had a second dummy node added as a dependency of the root node.
1 parent 4c91225 commit 3d178e0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

test/lib/response-builder.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,6 @@ describe("buildResponse", () => {
14171417
};
14181418

14191419
const depsWithBaseAndUser = {
1420-
"docker-image|my-image": node("docker-image|my-image").build(),
14211420
foo: node("foo")
14221421
.withChild(node("foo/foo-dev").withChild("foo/foo-lib"))
14231422
.build(),
@@ -1450,7 +1449,6 @@ describe("buildResponse", () => {
14501449
expect(pkgNames).toContain("foo");
14511450
expect(pkgNames).toContain("foo/foo-dev");
14521451
expect(pkgNames).toContain("foo/foo-lib");
1453-
expect(pkgNames).not.toContain("docker-image|my-image");
14541452
expect(pkgNames).not.toContain("base/base");
14551453

14561454
// Assert that the dockerfileAnalysis fact is present and only contains packages keyed by source segment.
@@ -1489,7 +1487,6 @@ describe("buildResponse", () => {
14891487

14901488
const pkgNames = getDepPkgs(result.scanResults[0]).map((p) => p.name);
14911489
expect(pkgNames).toContain("foo");
1492-
expect(pkgNames).toContain("docker-image|my-image");
14931490
expect(pkgNames).toContain("base/base");
14941491
});
14951492

@@ -1526,7 +1523,6 @@ describe("buildResponse", () => {
15261523

15271524
const pkgNames = getDepPkgs(result.scanResults[0]).map((p) => p.name);
15281525
expect(pkgNames).toContain("foo");
1529-
expect(pkgNames).not.toContain("docker-image|my-image");
15301526
expect(pkgNames).not.toContain("base/base");
15311527

15321528
// Assert that the autoDetectedUserInstructions fact is present and only contains packages keyed by source segment.
@@ -1610,7 +1606,6 @@ describe("buildResponse", () => {
16101606
const result = await buildResponse(analysis as any, undefined, true);
16111607

16121608
const pkgNames = getDepPkgs(result.scanResults[0]).map((p) => p.name);
1613-
expect(pkgNames).toContain("docker-image|my-image");
16141609
expect(pkgNames).toContain("foo");
16151610
expect(pkgNames).toContain("base/base");
16161611

0 commit comments

Comments
 (0)