From 3041282a2d3bf79861e9c0e3598332d0cc1ca19a Mon Sep 17 00:00:00 2001 From: Tom Hombergs Date: Mon, 16 Oct 2017 22:10:38 +0200 Subject: [PATCH] fix(verification): pass validation error message on --- src/pact-web.js | 7 +------ test/dsl/integration.spec.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pact-web.js b/src/pact-web.js index 35f8ce655..559624b58 100644 --- a/src/pact-web.js +++ b/src/pact-web.js @@ -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) }) }, /** diff --git a/test/dsl/integration.spec.js b/test/dsl/integration.spec.js index 0d9c1bc2c..0fceac18d 100644 --- a/test/dsl/integration.spec.js +++ b/test/dsl/integration.spec.js @@ -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) }) }) })