77 "testing"
88
99 "github.com/stretchr/testify/assert"
10+ "github.com/stretchr/testify/require"
1011)
1112
1213// TestSpec_PublicAPI_IsRateLimitError validates the documented behavior of
@@ -274,7 +275,7 @@ func TestSpec_PublicAPI_IsValidFullSHA(t *testing.T) {
274275func TestSpec_PublicAPI_FindGitRoot (t * testing.T ) {
275276 t .Run ("returns non-empty absolute path when in git repository" , func (t * testing.T ) {
276277 root , err := FindGitRoot ()
277- assert .NoError (t , err , "FindGitRoot should not error when inside a git repository" )
278+ require .NoError (t , err , "FindGitRoot should not error when inside a git repository" )
278279 assert .NotEmpty (t , root , "FindGitRoot should return a non-empty path" )
279280 assert .True (t , filepath .IsAbs (root ),
280281 "FindGitRoot should return an absolute path, got %q" , root )
@@ -295,7 +296,7 @@ func TestSpec_PublicAPI_ReadFileFromHEADWithRoot(t *testing.T) {
295296
296297 t .Run ("reads known file from HEAD without error" , func (t * testing.T ) {
297298 content , err := ReadFileFromHEADWithRoot (filepath .Join (root , "go.mod" ), root )
298- assert .NoError (t , err , "ReadFileFromHEADWithRoot should read go.mod without error" )
299+ require .NoError (t , err , "ReadFileFromHEADWithRoot should read go.mod without error" )
299300 assert .NotEmpty (t , content , "content of go.mod should not be empty" )
300301 })
301302
0 commit comments