Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After() hooks execution order with Cucumber 11.0.1 #2455

Closed
m4rtelli opened this issue Dec 11, 2024 · 1 comment · Fixed by #2456
Closed

After() hooks execution order with Cucumber 11.0.1 #2455

m4rtelli opened this issue Dec 11, 2024 · 1 comment · Fixed by #2456

Comments

@m4rtelli
Copy link

👓 What did you see?

Cucumber After() hooks have always executed in reverse order for us. We just upgraded from 10.9.0 to 11.0.1 and we are noticing that After() hooks seem to be executing now in the order in which they were defined inside of hooks.

✅ What did you expect to see?

I was expecting to see After() hooks execution in reverse order.

📦 Which tool/library version are you using?

Node 22.11.0 and @cucumber/cucumber 11.0.1

🔬 How could we reproduce it?

No response

📚 Any additional context?

Here's an example of some AfterAll() hooks defined in my code:
Screenshot 2024-12-11 at 2 14 03 PM

Now here's an example of my logger, showing the execution order:
Screenshot 2024-12-11 at 2 13 39 PM

With 10.9.0, these do print out in reverse order inside the log file.

@davidjgoss
Copy link
Contributor

Thanks for flagging this @m4rtelli - fixed in https://github.com/cucumber/cucumber-js/releases/tag/v11.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants