pact-foundation / roadmap

Developer Relations @ Pact - Your map to the Pact landscape for all-comers (maintainers, contributors, users, newbies)
https://pact.io/
MIT License
39 stars 6 forks source link

Framework wide verification beforeEach / afterEach hooks #80

Open canny[bot] opened 4 days ago

canny[bot] commented 4 days ago

Pact-JS has beforeEach / afterEach state shooks, but they're a bit of a hack. One problem with this hack is that the afterEach hook is called before the state teardown hooks (which is a bit unintuitive).

It would be neat if the pact core had some reserved state names that it always called before / after each test, meaning that the order could be more easily reasoned about. This would give the beforeEach / afterEach functionality to all pact libraries, too.

https://pact.canny.io/admin/board/feature-requests/p/framework-wide-verification-beforeeach-aftereach-hooks

canny[bot] commented 4 days ago

This issue has been linked to a Canny post: Framework wide verification beforeEach / afterEach hooks :tada:

YOU54F commented 4 days ago

Matt Fellows - February 24, 2023

Good call. This would make it easier to explain the lifecycle across the client libraries in a consistent and stable way.