Skip to content

Commit

Permalink
fix(verification): pass validation error message on
Browse files Browse the repository at this point in the history
  • Loading branch information
thombergs committed Oct 16, 2017
1 parent f5387a0 commit 3041282
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/pact-web.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,7 @@ module.exports = (opts) => {
return mockService.verify()
.then(() => mockService.removeInteractions())
.catch(e => {
// Properly format the error
console.error('')
console.error('Pact verification failed!')
console.error(e)

throw new Error('Pact verification failed - expected interactions did not match actual.')
throw new Error(e)
})
},
/**
Expand Down
2 changes: 1 addition & 1 deletion test/dsl/integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe('Integration', () => {
.then(() => {}, (err) => { promiseResults.push(err.response) })
.then(() => provider.verify(promiseResults))

expect(verificationPromise).to.be.rejectedWith('Error: Pact verification failed - expected interactions did not match actual.').notify(done)
expect(verificationPromise).to.be.rejected.notify(done)
})
})
})
Expand Down

0 comments on commit 3041282

Please sign in to comment.