Merge pull request #4 from sharelatex/bg-fix-listen-in-acceptance-tests

exit if mock servers fail to start
This commit is contained in:
Brian Gough 2017-10-25 09:13:48 +01:00 committed by GitHub
commit e590543e42
2 changed files with 6 additions and 0 deletions

View file

@ -15,6 +15,9 @@ module.exports = MockTrackChangesApi =
app.listen 3015, (error) -> app.listen 3015, (error) ->
throw error if error? throw error if error?
.on "error", (error) ->
console.error "error starting MockTrackChangesApi:", error.message
process.exit(1)
MockTrackChangesApi.run() MockTrackChangesApi.run()

View file

@ -40,6 +40,9 @@ module.exports = MockWebApi =
app.listen 3000, (error) -> app.listen 3000, (error) ->
throw error if error? throw error if error?
.on "error", (error) ->
console.error "error starting MockWebApi:", error.message
process.exit(1)
MockWebApi.run() MockWebApi.run()