Skip to content

Commit

Permalink
chore(docs): update documentation
Browse files Browse the repository at this point in the history
- Add E2E complete example to Examples section.
- Add required 'consumerVersion' property to the publish task
- Update E2E docs formatting
  • Loading branch information
mefellows committed Jan 18, 2017
1 parent 1a33507 commit f71b2f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ npm install --save-dev pact

### Examples

[Pact with Jest (Node env)](https://github.com/pact-foundation/pact-js/tree/master/examples/jest)

[Pact with Mocha](https://github.com/pact-foundation/pact-js/tree/master/examples/mocha)

[Pact with Karma + Jasmine](https://github.com/pact-foundation/pact-js/tree/master/karma/jasmine)

[Pact with Karma + Mocha](https://github.com/pact-foundation/pact-js/tree/master/karma/mocha)
* [Complete Example (Node env)](https://github.com/pact-foundation/pact-js/tree/master/examples/e2e)
* [Pact with Jest (Node env)](https://github.com/pact-foundation/pact-js/tree/master/examples/jest)
* [Pact with Mocha](https://github.com/pact-foundation/pact-js/tree/master/examples/mocha)
* [Pact with Karma + Jasmine](https://github.com/pact-foundation/pact-js/tree/master/karma/jasmine)
* [Pact with Karma + Mocha](https://github.com/pact-foundation/pact-js/tree/master/karma/mocha)

#### Note on Jest
Jest uses JSDOM under the hood which may cause weird issues with libraries making HTTP request. Check [this issue](https://github.com/pact-foundation/pact-js/issues/10) and more explicitly [this comment](https://github.com/pact-foundation/pact-js/issues/10#issuecomment-249356066) about that.
Expand Down Expand Up @@ -211,7 +209,8 @@ var opts = {
pactUrls: <Array>, // Array of local Pact files or directories containing them. Required.
pactBroker: <String>, // URL to fetch the provider states for the given provider API. Optional.
pactBrokerUsername: <String>, // Username for Pact Broker basic authentication. Optional
pactBrokerPassword: <String> // Password for Pact Broker basic authentication. Optional
pactBrokerPassword: <String>, // Password for Pact Broker basic authentication. Optional
consumerVersion: <String> // A string containing a semver-style version e.g. 1.0.0. Required.
};

pact.publishPacts(opts)).then(function () {
Expand Down
3 changes: 2 additions & 1 deletion examples/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ A test [Pact Boker](https://github.com/bethesque/pact_broker) is running at http

Or use the API:

```curl -v -u 'dXfltyFMgNOFZAxr8io9wJ37iUpY42M:O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1' https://test.pact.dius.com.au
```
curl -v -u 'dXfltyFMgNOFZAxr8io9wJ37iUpY42M:O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1' https://test.pact.dius.com.au
```

0 comments on commit f71b2f1

Please sign in to comment.