Skip to content

[Bug]: Hooks for before/after the entire suite #1589

@djibarian

Description

@djibarian

What Happened

Docs say

In addition, you can define global hooks that will run before or after your entire test suite, regardless of the folder or group.

but after wasting a few hours I wasn't able to find a single working solution for it, much less a simple and straightforward one for such a primitive requirement.

https://pestphp.com/docs/global-hooks#:~:text=In%20addition%2C%20you%20can%20define%20global%20hooks%20that%20will%20run%20before%20or%20after%20your%20entire%20test%20suite%2C%20regardless%20of%20the%20folder%20or%20group.

How to Reproduce

Just try to run a hook before/after running the entire suite.

Sample Repository

No response

Pest Version

4.1.3

PHP Version

8.3.27

Operation System

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions