Improve output for test case

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
This commit is contained in:
Dan Luhring 2021-01-22 15:20:42 -05:00
parent d5779a9822
commit 4576c081b9
No known key found for this signature in database
GPG key ID: 9CEE23D079426CEF

View file

@ -155,7 +155,7 @@ func TestParsePackageJSON_Partial(t *testing.T) { // see https://github.com/anch
t.Fatalf("failed to parse package-lock.json: %+v", err)
}
if len(actual) != 0 {
t.Errorf("no packages should've been returned")
if actualCount := len(actual); actualCount != 0 {
t.Errorf("no packages should've been returned (but got %d packages)", actualCount)
}
}