|
8 | 8 | beforeAll(function(done) { |
9 | 9 | client = example.createClient('http://localhost:1234') |
10 | 10 | provider = Pact({ consumer: 'Karma Jasmine', provider: 'Hello' }) |
| 11 | + |
11 | 12 | // required for slower Travis CI environment |
12 | 13 | setTimeout(function () { done() }, 2000) |
| 14 | + |
| 15 | + // Required if run with `singleRun: false` |
| 16 | + provider.removeInteractions() |
13 | 17 | }) |
14 | 18 |
|
15 | 19 | afterAll(function (done) { |
|
47 | 51 | }) |
48 | 52 |
|
49 | 53 | // verify with Pact, and reset expectations |
50 | | - it('successfully verifies', function() { provider.verify() }) |
| 54 | + it('successfully verifies', function(done) { |
| 55 | + provider.verify() |
| 56 | + .then(function(a) { |
| 57 | + done() |
| 58 | + }, function(e) { |
| 59 | + done.fail(e) |
| 60 | + }) |
| 61 | + }) |
51 | 62 | }) |
52 | 63 |
|
53 | 64 | describe("findFriendsByAgeAndChildren", function () { |
|
91 | 102 | }) |
92 | 103 |
|
93 | 104 | // verify with Pact, and reset expectations |
94 | | - it('successfully verifies', function() { provider.verify() }) |
| 105 | + // verify with Pact, and reset expectations |
| 106 | + it('successfully verifies', function(done) { |
| 107 | + provider.verify() |
| 108 | + .then(function(a) { |
| 109 | + done() |
| 110 | + }, function(e) { |
| 111 | + done.fail(e) |
| 112 | + }) |
| 113 | + }) |
95 | 114 | }) |
96 | 115 |
|
97 | 116 | describe("unfriendMe", function () { |
|
132 | 151 | }) |
133 | 152 | }) |
134 | 153 |
|
135 | | - it('successfully verifies', function() { provider.verify() }) |
| 154 | + // verify with Pact, and reset expectations |
| 155 | + it('successfully verifies', function(done) { |
| 156 | + provider.verify() |
| 157 | + .then(function(a) { |
| 158 | + done() |
| 159 | + }, function(e) { |
| 160 | + done.fail(e) |
| 161 | + }) |
| 162 | + }) |
136 | 163 | }) |
137 | 164 |
|
138 | 165 | // verify with Pact, and reset expectations |
|
167 | 194 | }) |
168 | 195 |
|
169 | 196 | // verify with Pact, and reset expectations |
170 | | - it('successfully verifies', function() { provider.verify() }) |
| 197 | + // verify with Pact, and reset expectations |
| 198 | + it('successfully verifies', function(done) { |
| 199 | + provider.verify() |
| 200 | + .then(function(a) { |
| 201 | + done() |
| 202 | + }, function(e) { |
| 203 | + done.fail(e) |
| 204 | + }) |
| 205 | + }) |
171 | 206 | }) |
172 | 207 | }) |
173 | 208 |
|
|
0 commit comments