cucumber / godog

Cucumber for golang
MIT License
2.32k stars 254 forks source link

PostStepHook is what I think AfterStepHook ought to have been - https://github.com/cucumber/godog/issues/633 #634

Closed Johnlon closed 4 months ago

Johnlon commented 5 months ago

See https://github.com/cucumber/godog/issues/633

🤔 What's changed?

https://github.com/cucumber/godog/issues/633 covers the proposal.

AfterStepHook doesn't allow full manipulation of the test outcome, so added PostStepHook to compensate without breaking compat.

⚡️ What's your motivation?

I need full control over the test outcome from a hook and the AfterStepHook does not permit that.

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

To be honest I'd rather just introduct a breaking change and replace the logic of AfterStep with my proposed PostStep.

📋 Checklist:

I've added an _example but not figured out the testing.

Johnlon commented 4 months ago

Not going to progress