Skip to content

After() hooks execution order with Cucumber 11.0.1 #2455

Closed
@m4rtelli

Description

👓 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions