Fail acceptance tests on unhandled promise rejection

This commit is contained in:
Simon Detheridge 2020-03-26 15:11:22 +00:00
parent 7e45a82c35
commit 238d96ed44

View file

@ -26,6 +26,12 @@ if (!process.env.AWS_ACCESS_KEY_ID) {
throw new Error('please provide credentials for the AWS S3 test server') throw new Error('please provide credentials for the AWS S3 test server')
} }
process.on('unhandledRejection', e => {
// eslint-disable no-console
console.log('** Unhandled Promise Rejection **\n', e)
throw e
})
// store settings for multiple backends, so that we can test each one. // store settings for multiple backends, so that we can test each one.
// fs will always be available - add others if they are configured // fs will always be available - add others if they are configured
const BackendSettings = require('./TestConfig') const BackendSettings = require('./TestConfig')