test(e2e): adjust tests and make them fail on CI

This commit is contained in:
Benedikt Rötsch
2017-11-08 17:39:39 +01:00
committed by Benedikt Rötsch
parent 13a49aa2ad
commit 767a1e8a46
2 changed files with 12 additions and 7 deletions

View File

@@ -23,8 +23,12 @@ server.listen(TEST_PORT, function () {
CONTENTFUL_SPACE_ID, CONTENTFUL_DELIVERY_TOKEN, CONTENTFUL_PREVIEW_TOKEN
}
})
.then(() => {
.then((result) => {
server.close()
if (result.failures > 0) {
process.exit(1)
return
}
process.exit(0)
}).catch(() => {
server.close()