ci(lint): enable testifylint linter (#4010)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-07-14 14:33:08 +02:00
committed by GitHub
parent 626d55b0c0
commit 5f55c6a711
20 changed files with 461 additions and 452 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/gin-gonic/gin/internal/json"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestError(t *testing.T) {
@ -122,7 +123,7 @@ func TestErrorUnwrap(t *testing.T) {
})
// check that 'errors.Is()' and 'errors.As()' behave as expected :
assert.True(t, errors.Is(err, innerErr))
require.ErrorIs(t, err, innerErr)
var testErr TestErr
assert.True(t, errors.As(err, &testErr))
require.ErrorAs(t, err, &testErr)
}