diff --git a/pkg/lockfile/helpers_test.go b/pkg/lockfile/helpers_test.go index bc26b62af7..9db55de19d 100644 --- a/pkg/lockfile/helpers_test.go +++ b/pkg/lockfile/helpers_test.go @@ -42,7 +42,13 @@ func packageToString(pkg lockfile.PackageDetails) string { commit = "" } - return fmt.Sprintf("%s@%s (%s, %s)", pkg.Name, pkg.Version, pkg.Ecosystem, commit) + groups := strings.Join(pkg.DepGroups, ", ") + + if groups == "" { + groups = "" + } + + return fmt.Sprintf("%s@%s (%s, %s, %s)", pkg.Name, pkg.Version, pkg.Ecosystem, commit, groups) } func hasPackage(t *testing.T, packages []lockfile.PackageDetails, pkg lockfile.PackageDetails) bool {