frp/utils/errors/errors_test.go

17 lines
244 B
Go
Raw Normal View History

2017-03-27 17:46:38 +02:00
package errors
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPanicToError(t *testing.T) {
assert := assert.New(t)
err := PanicToError(func() {
panic("test error")
})
assert.Contains(err.Error(), "test error")
}