From 238d96ed448787ff3e91a9f926f0bdb08a9b4c99 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Thu, 26 Mar 2020 15:11:22 +0000 Subject: [PATCH] Fail acceptance tests on unhandled promise rejection --- services/filestore/test/acceptance/js/FilestoreTests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/filestore/test/acceptance/js/FilestoreTests.js b/services/filestore/test/acceptance/js/FilestoreTests.js index 668570e7cb..a2c710a382 100644 --- a/services/filestore/test/acceptance/js/FilestoreTests.js +++ b/services/filestore/test/acceptance/js/FilestoreTests.js @@ -26,6 +26,12 @@ if (!process.env.AWS_ACCESS_KEY_ID) { 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. // fs will always be available - add others if they are configured const BackendSettings = require('./TestConfig')