Skip to content

Commit

Permalink
test: make output tests their own package (#461)
Browse files Browse the repository at this point in the history
This is good practice since you shouldn't be testing the private
internals of a package, even if its a private package
  • Loading branch information
G-Rath authored Aug 2, 2023
1 parent bbf1bcf commit 0316ea3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/output/sarif_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package output
package output_test

import (
"testing"

"github.com/google/osv-scanner/internal/output"
"github.com/google/osv-scanner/internal/testutility"
"github.com/google/osv-scanner/pkg/models"
)
Expand Down Expand Up @@ -30,7 +31,7 @@ func TestGroupFixedVersions(t *testing.T) {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got := GroupFixedVersions(tt.args.flattened)
got := output.GroupFixedVersions(tt.args.flattened)
testutility.AssertMatchFixtureJSON(t, tt.wantPath, got)
})
}
Expand Down

0 comments on commit 0316ea3

Please sign in to comment.