Hi guys, at Provider sider verification I have two...
# pact-js
a
Hi guys, at Provider sider verification I have two requests to be verified. One is Post and other is get. I want to read ‘id’ from Post response and fed it to get request (get by id). How do I read response using requestFilter?
t
The request filter is for requests. Why do you want to read the response?
Pact should read and validate the response for you
a
Actually the post request to create a user gives me back the user Id which I want and pass it to Get request to retrieve the user
t
I would not recommend using pact that way. It's better to treat each request as independent
m
You should read up on provider states. In Pact testing we want to avoid this kind of test coupling. Each test should be able to be tested in isolation, and provider states is the primary mechanism to achieve this
💯 1
t
Pact does not guarantee the order of interaction
☝️ 1
m
Always with the timing Tim 🤣
😂 2