Back out the testify/assert addition 😅
This commit is contained in:
parent
47a412375f
commit
df5c6caa96
12
app_test.go
12
app_test.go
@ -11,8 +11,6 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -276,10 +274,10 @@ func TestApp_Run(t *testing.T) {
|
||||
}
|
||||
|
||||
err := app.Run([]string{"command", "foo"})
|
||||
assert.Nil(t, err)
|
||||
expect(t, err, nil)
|
||||
err = app.Run([]string{"command", "bar"})
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "foobar", s)
|
||||
expect(t, err, nil)
|
||||
expect(t, s, "foobar")
|
||||
}
|
||||
|
||||
var commandAppTests = []struct {
|
||||
@ -333,8 +331,8 @@ func TestApp_CommandWithArgBeforeFlags(t *testing.T) {
|
||||
}
|
||||
app.Run([]string{"", "cmd", "my-arg", "--option", "my-option"})
|
||||
|
||||
assert.Equal(t, parsedOption, "my-option")
|
||||
assert.Equal(t, firstArg, "my-arg")
|
||||
expect(t, parsedOption, "my-option")
|
||||
expect(t, firstArg, "my-arg")
|
||||
}
|
||||
|
||||
func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHandleExitCoder_nil(t *testing.T) {
|
||||
@ -119,6 +117,6 @@ func TestHandleExitCoder_MultiErrorWithFormat(t *testing.T) {
|
||||
err := newMultiError(NewErrorWithFormat("err1"), NewErrorWithFormat("err2"))
|
||||
HandleExitCoder(err)
|
||||
|
||||
assert.True(t, called)
|
||||
assert.Equal(t, "This the format: err1\nThis the format: err2\n", ErrWriter.(*bytes.Buffer).String())
|
||||
expect(t, called, true)
|
||||
expect(t, ErrWriter.(*bytes.Buffer).String(), "This the format: err1\nThis the format: err2\n")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user