Pact module.
Creates a new PactProvider.
(Object)
Name | Description |
---|---|
opts.consumer string
|
the name of the consumer |
opts.provider string
|
the name of the provider |
opts.port number
|
port of the mock service, defaults to 1234 |
opts.host string
|
host address of the mock service, defaults to 127.0.0.1 |
opts.ssl boolean
|
SSL flag to identify the protocol to be used (default false, HTTP) |
Exposes Matchers#term
Add an interaction to the MockService.
(Interaction)
Promise
:
Start the Mock Server.
Promise
:
Provider Verifier service
Mock Service is the HTTP interface to setup the Pact Mock Service. See https://github.com/bethesque/pact-mock_service and https://gist.github.com/bethesque/9d81f21d6f77650811f4.
Adds an interaction
(Interaction)
Promise
:
An Interaction is where you define the state of your interaction with a Provider.
Creates a new Interaction.
Interaction
:
interaction
Gives a state the provider should be in for this interaction.
(string)
The state of the provider.
Interaction
:
interaction
A free style description of the interaction.
(string)
A description of the interaction.
Interaction
:
interaction
The request that represents this interaction triggered by the consumer.
(Object)
Name | Description |
---|---|
requestOpts.method string
|
The HTTP method |
requestOpts.path string
|
The path of the URL |
requestOpts.query string
|
Any query string in the interaction |
requestOpts.headers Object
|
A key-value pair oject of headers |
requestOpts.body Object
|
The body, in String format or Object format |
Interaction
:
interaction