cucumber / godog

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

Improve hooks invocation flow #568

Closed vearutop closed 10 months ago

vearutop commented 10 months ago

🤔 What's changed?

⚡️ What's your motivation?

Hooks invocation isn't consistent across different situations, this PR tries to improve that and make behavior less surprising. Resolves #565. Resolves #560. Resolves #486.

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

📋 Checklist:


This text was originally generated from a template, then edited by hand. You can modify the template here.

github-actions[bot] commented 10 months ago

Go API Changes

# github.com/cucumber/godog
## compatible changes
ErrSkip: added
ScenarioContext.AfterScenario: added
ScenarioContext.AfterStep: added
ScenarioContext.BeforeScenario: added
ScenarioContext.BeforeStep: added
ScenarioContext.Given: added
ScenarioContext.Step: added
ScenarioContext.StepContext: added
ScenarioContext.Then: added
ScenarioContext.When: added

# github.com/cucumber/godog/formatters
## compatible changes
Given: added
Keyword: added
None: added
StepDefinition.Keyword: added
Then: added
When: added

# summary
Inferred base version: v0.12.6
Suggested version: v0.13.0
codecov[bot] commented 10 months ago

Codecov Report

Merging #568 (832cf53) into main (51d164f) will decrease coverage by 0.03%. The diff coverage is 77.61%.

@@            Coverage Diff             @@
##             main     #568      +/-   ##
==========================================
- Coverage   82.96%   82.94%   -0.03%     
==========================================
  Files          28       28              
  Lines        3375     3412      +37     
==========================================
+ Hits         2800     2830      +30     
- Misses        461      467       +6     
- Partials      114      115       +1     
Impacted Files Coverage Δ
suite.go 86.92% <77.61%> (-2.48%) :arrow_down:

... and 1 file with indirect coverage changes