Skip to content

Commit 404c5a6

Browse files
committed
fix: change redundant assert to require for simplicity
1 parent a9250c6 commit 404c5a6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

params/json.libevm_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"testing"
88

99
"github.com/ethereum/go-ethereum/libevm/pseudo"
10-
"github.com/stretchr/testify/assert"
1110
"github.com/stretchr/testify/require"
1211
)
1312

@@ -83,16 +82,16 @@ func TestChainConfigJSONRoundTrip(t *testing.T) {
8382
t.Run("json.Unmarshal()", func(t *testing.T) {
8483
got := new(ChainConfig)
8584
require.NoError(t, json.Unmarshal([]byte(tt.jsonInput), got))
86-
assert.Equal(t, tt.want, got)
85+
require.Equal(t, tt.want, got)
8786
})
8887

8988
t.Run("json.Marshal()", func(t *testing.T) {
9089
var want bytes.Buffer
9190
require.NoError(t, json.Compact(&want, []byte(tt.jsonInput)), "json.Compact()")
9291

9392
got, err := json.Marshal(tt.want)
94-
require.NoError(t, err)
95-
assert.Equal(t, want.String(), string(got))
93+
require.NoError(t, err, "json.Marshal()")
94+
require.Equal(t, want.String(), string(got))
9695
})
9796
})
9897
}

0 commit comments

Comments
 (0)