A DSL library to describe Pact behaviour to the mock server.
npm install pact-dsl --save-dev
To develop this project, simply install the dependencies and run npm watch
to for continual development, linting and testing when a source file changes.
Running npm test
will execute the tests that has the *.spec.js
pattern.
dsl.given('an http query') .uponReceiving('a search GET request with a query') .withRequest({method: 'get', path: '/_search', query: term('q=.*', 'q=test'), headers: requestHeaders}) .willRespondWith({ status: 200, headers: responseHeaders, body: mockWithResults });