Closed KielChan closed 6 years ago
if i have function like this:
func DemoVoidReturn(){ fmt.Println("test empty return") if err := doSomething(); err != nil{ panic("do something failed") } }
and i want to test this panic.
how to use So to test it?
So
Your function in a void (no return values), niladic (no input parameters) function and the perform the assertion.
So(wrapperFunction, should.Panic)
if i have function like this:
and i want to test this panic.
how to use
So
to test it?