pact-node-example | Example Consumer-Driven Contract tests in node.js | Testing library
kandi X-RAY | pact-node-example Summary
kandi X-RAY | pact-node-example Summary
#Better Testing of Microservices Using Consumer-Driven Contracts in Node.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pact-node-example
pact-node-example Key Features
pact-node-example Examples and Code Snippets
Community Discussions
Trending Discussions on pact-node-example
QUESTION
I am using Pact.js first time for microservice testing. I tried to follow these following examples:
https://github.com/pact-foundation/pact-js/tree/master/examples/e2e
https://github.com/pact-foundation/pact-js/tree/master/examples/mocha
In example 3; I navigate into test folder and run mocha index.spec.js
But it throws the following error:
ANSWER
Answered 2017-Feb-28 at 22:02Can you please try the following?
- Increase the tests timeout (currently at 2s)
- set
logLevel: 'DEBUG'
in anypact({...})
declarations - Re-run the tests
And provide us a gist of the output.
It seems the Ruby mock server is not starting or is taking longer than 2 seconds, and the node process is timing out waiting for it to come up.
If that doesn't work, please try manually starting the mock service ./node_modules/bin/pact-mock-service --port 1234
and when it comes up, run the command netstat -an | grep LISTEN | grep 1234
so that we can see what network it is binding to.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pact-node-example
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page