Hi, I'm testing against the latest stubs after my ...
# pact-js
b
Hi, I'm testing against the latest stubs after my provider has published a contract. And I'm seeing this in the logs. Stub URL:
Copy code
https://<our domain>.<http://pactflow.io/pacts/provider/<provider>/consumer/<consumer>/latest/stub/|pactflow.io/pacts/provider/<provider>/consumer/<consumer>/latest/stub/>
Logs:
Copy code
I, [2022-04-05T15:18:42.151021 #53]  INFO -- : Registered expected interaction POST /api/v2/login
W, [2022-04-05T15:18:43.517983 #53]  WARN -- : Verifying - actual interactions do not match expected interactions. 
Missing requests:
	POST /api/v2/login
The tests fail on:
Copy code
await mockProvider.verify();
m
the stubs aren’t for use during your contract tests, you use the local mock server for that
stubs are for use cases outside of Pact directly (e.g. cypress browser tests)
b
Oh, I see.
m
May I ask what gave you the impression they were for use in Pact unit tests?
We might need to address our documentation
b
It just wasn't clear that they shouldn't be used for them.
This was helpful: stubs are for use cases outside of Pact directly (e.g. cypress browser tests)
👍 1
m
Thanks Bernard - I think we’ll clarify that on the page. Apologies for the confusion (and also - thanks for coming along and I hope the webinar was helpful!)
b
It was helpful, really informative and much simpler to understand and convey to other colleagues afterwards.
🙌 1