errorx._test.go 211 B

123456789101112131415
  1. package errorx
  2. import (
  3. "errors"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestWrap(t *testing.T) {
  8. err := errors.New("foo")
  9. err = Wrap(err)
  10. _, ok := err.(*GoctlError)
  11. assert.True(t, ok)
  12. }