Skip to content

Commit

Permalink
chore(examples): upate parallel test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Dec 11, 2017
1 parent 271fc7d commit f9aa011
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ Pact tests are inherently stateful, as we need to keep track of the interactions
The good news is, parallel test execution is possible, you need to ensure that:
1. Before any test run invocation, you remove any existing pact files (otherwise you end up with invalid interactions left over from previous test runs)
1. Each test is fully self-contained, with its own mock server on its own port
1. You set the option `pactfileWriteMode` to `"merge"`, instructing Pact to merge any pact documents with the same consumer and provider pairing at the end of all test runs.
Expand Down
2 changes: 1 addition & 1 deletion examples/ava/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Ava Pact example",
"main": "index.js",
"scripts": {
"test": "ava"
"test": "if [ -d 'pacts' ]; then rm -rf pacts; fi && ava"
},
"license": "MIT",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Mocha Pact example",
"main": "index.js",
"scripts": {
"test": "mocha-parallel-tests"
"test": "if [ -d 'pacts' ]; then rm -rf pacts; fi && mocha-parallel-tests"
},
"license": "MIT",
"devDependencies": {
Expand Down

0 comments on commit f9aa011

Please sign in to comment.