Join Slack
Powered by
Hi. I am just looking at the provider-example <htt...
# general
t
Tam Norris
05/11/2023, 11:14 AM
Hi. I am just looking at the provider-example
https://github.com/pactflow/example-provider/blob/master/src/product/product.providerChange.pact.test.js
. This might be a stupid question but I just want to confirm is this just using a dummy (mock) provider? In a real provider contract test would this be making calls to an actual api?
y
Yousaf Nabi (pactflow.io)
05/11/2023, 12:04 PM
it makes calls to the real provider api, which is started up as part of the test
Yousaf Nabi (pactflow.io)
05/11/2023, 12:06 PM
https://github.com/pactflow/example-provider/blob/594529a11b188f55d6dc86d95355f8a947d357b3/src/product/pact.setup.js#L14-L21
this is where is starts express and loads in the routes and middleware
t
Tam Norris
05/11/2023, 12:24 PM
ok, thanks Yousaf. I think I was thrown by the stateHandlers function. I thought it was returning dummy responses.
Open in Slack
Previous
Next