Skip to content

Commit

Permalink
fix(MessageProvider): Shut down test environment even if message prov…
Browse files Browse the repository at this point in the history
…ider throws an error
  • Loading branch information
TimothyJones committed Sep 26, 2019
1 parent fcdf561 commit 42863c3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/messageProviderPact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ export class MessageProviderPact {
// Run the verification once the proxy server is available
return this.waitForServerReady(server)
.then(this.runProviderVerification())
.then(result => {
server.close()
return result
})
.then(
result => {
server.close()
return result
},
err => {
server.close()
throw err
}
)
}

// Listens for the server start event
Expand Down

0 comments on commit 42863c3

Please sign in to comment.