cucumber / godog

Cucumber for golang
MIT License
2.21k stars 249 forks source link

step function support return a nil Context with error #592

Open Milk-Tang opened 5 months ago

Milk-Tang commented 5 months ago

👓 What did you see?

panic occured while I return (nil, err) in the step function

✅ What did you expect to see?

When I return a nil Context and non empty error, no panic error occurs

📦 Which tool/library version are you using?

v0.12.6

🔬 How could we reproduce it?

Run this step

func StepError(ctx context.Context) (context.Context, err) {
    return nil, errors.New("step failed")
}
o-brunofernandes commented 1 week ago

Did you get an answer on this?