Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
  • Loading branch information
rohit-nayak-ps committed Nov 22, 2024
1 parent df0cdf8 commit 65d82f3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions go/summarize/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package summarize

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -48,14 +49,9 @@ func TestGetFileType(t *testing.T) {
t.Run(tc.filename, func(t *testing.T) {
ft, err := getFileType(tc.filename)
if tc.expectedError != "" {
require.Error(t, err)
}
if err != nil {
require.Contains(t, err.Error(), tc.expectedError)
}
if ft != tc.expectedType {
t.Errorf("Expected type: %v, got: %v", tc.expectedType, ft)
require.ErrorContains(t, err, tc.expectedError)
}
assert.Equal(t, tc.expectedType, ft)
})
}
}

0 comments on commit 65d82f3

Please sign in to comment.