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 (#366)
  • Loading branch information
TimothyJones authored and mefellows committed Sep 29, 2019
1 parent 98b031a commit 3d66117
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 3d66117

Please sign in to comment.