func parseAction(items []interface{}, test t) *execution.Action { var index = 1 if test != nil { index = 2 } if action, parsed := items[index].(func()); parsed { return execution.NewAction(action) } if items[index] == nil { return execution.NewSkippedAction(skipReport) } panic(parseError) }
// Reset registers a cleanup function to be run after each Convey() // in the same scope. See the examples package for a simple use case. func Reset(action func()) { suites.CurrentRunner().RegisterReset(execution.NewAction(action)) }
func newFakeRunner() *fakeRunner { f := fakeRunner{} f.action = execution.NewAction(func() {}) return &f }
// Reset registers a cleanup function to be run after each Convey() // in the same scope. See the examples package for a simple use case. func Reset(action func()) { runner.RegisterReset(execution.NewAction(action)) }