NoErr asserts that err is nil. func Test(t *testing.T) { is := is.New(t) val, err := getVal() is.NoErr(err) // getVal error is.True(len(val) > 10) // val cannot be short } Will output: your_test.go:123: err: not found // getVal error
(err error, args ...interface{})
| 55 | // |
| 56 | // your_test.go:123: err: not found // getVal error |
| 57 | func (is *I) NoErr(err error, args ...interface{}) { |
| 58 | if err != nil { |
| 59 | is.logf("err: %s%s", err.Error(), is.formatArgs(args)) |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // New is a method wrapper around the New function. |
| 64 | // It allows you to write subtests using a similar |