mkdir hell
npm install --save-dev mocha
npm install --save-dev chai
npm install --save-dev axios
Add
"scripts": {
"test": "mocha"
}
to your package.json (create it if it doesn't exist)
Copy the tests from https://github.com/pact-foundation/pact-js/tree/master/examples/mocha
and put them in test
and copy index.js
and put it in hell
Replace ('../../../dist/pact') with ('@pact-foundation/pact')
in both test files and then install @pact-foundation/pact
npm install --save-dev @pact-foundation/pact
npm install
npm run test
It should generate a pact file and all the tests ought to pass