✨ Migrate from testify to nalgeon/be testing library
- Replace all testify/assert and testify/require with be library - Update go.mod to use be v0.3.0 instead of testify - Simplify test assertions using be.Equal, be.Err, and be.True - Refactor append_test, entry_test, meta_test, log_test, and formatter tests
This commit is contained in:
parent
79f58b3e6c
commit
1110288d84
16 changed files with 226 additions and 236 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/nalgeon/be"
|
||||
)
|
||||
|
||||
func TestWriteBuffer(t *testing.T) {
|
||||
|
|
@ -52,8 +52,8 @@ func getWriteTestRunner(value any, out string, err error) func(*testing.T) {
|
|||
return func(t *testing.T) {
|
||||
buff := &bytes.Buffer{}
|
||||
n, er := WriteValue(buff, value)
|
||||
assert.Equal(t, len(out), n)
|
||||
assert.Equal(t, err, er)
|
||||
assert.Equal(t, out, buff.String())
|
||||
be.Equal(t, n, len(out))
|
||||
be.Equal(t, er, err)
|
||||
be.Equal(t, buff.String(), out)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue