coder-society / contract-testing-nodejs-pact

Sample repository showing consumer-driven contract testing with Node.js and Pact.
https://codersociety.com/blog/articles/contract-testing-pact
1 stars 6 forks source link

getting error while executing consumer #1

Open chandrasekhaer opened 3 years ago

chandrasekhaer commented 3 years ago

1) Pact with Order API "before all" hook in "Pact with Order API": Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\contract-testing-nodejs-pact-master\consumer. spec.js) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)

2) Pact with Order API "after all" hook in "Pact with Order API": TypeError: Cannot read property 'writePact' of undefined at Pact.finalize (node_modules\@pact-foundation\pact\httpPact.js:121:14) at Context. (consumer.spec.js:15:24) at processImmediate (internal/timers.js:461:21)

vijayadeeptim commented 2 years ago

@chandrasekhaer Im not from the coder-society but faced the same issue. The author seemed to have changed the ports in consumer.spec and consumer.js files on develop branch. That fixed the errors for me .