Hi. I am new to pact flow and looking to see if I ...
# pact-js
t
Hi. I am new to pact flow and looking to see if I can use it within my organisation. I have cloned the example code on this blog ...https://www.testingwithmarie.com/post/contract-testing-with-pact-js-and-jest and have been able to get it working and published to my pact broker. I am just playing around with it and want to extend it to add more interactions for other requests. I modified my code based on an example found https://medium.com/@jw_ng/contract-testing-with-pactjs-and-jest-f93c1ffe75a0 however when I try to run the consumer test I get the error ...TypeError: provider.setUp is not a function. It appears that the Pact mock server doesn't start as I also see 'pact@9.17.2: The pact mock service doesn't appear to be running'. Does anyone know what the cause and possible solution of this might be or could point be to some code samples that involve adding multiple interactions to a consumer contract? Much appreciated.
m
We have a bunch of examples on the docs site here: https://docs.pact.io/implementation_guides/workshops#examples
A number of the examples in https://github.com/pact-foundation/pact-js/tree/master/examples also have multiple interactions in them. Last comment - those examples you mentioned are on an older version of Pact JS. I’d start with the latest version (11.x.x)
t
ok, thanks Matt. I will have a look at these.
👍 1