Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.49 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.49 KB

Build Status

Pact DSL

A DSL library to describe Pact behaviour to the mock server.

Usage

Node

npm install pact-dsl --save-dev

Grunt

Gulp

Contributing

To develop this project, simply install the dependencies and run npm watch to for continual development, linting and testing when a source file changes.

Testing

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 });