diff options
Diffstat (limited to 'test/helper.js')
-rw-r--r-- | test/helper.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/helper.js b/test/helper.js index aaac7580e..1c5934a89 100644 --- a/test/helper.js +++ b/test/helper.js @@ -20,14 +20,12 @@ window.localStorage = {} if (!window.crypto) window.crypto = {} if (!window.crypto.getRandomValues) window.crypto.getRandomValues = require('polyfill-crypto.getrandomvalues') - - -function enableFailureOnUnhandledPromiseRejection() { +function enableFailureOnUnhandledPromiseRejection () { // overwrite node's promise with the stricter Bluebird promise global.Promise = require('bluebird') // modified from https://github.com/mochajs/mocha/issues/1926#issuecomment-180842722 - + // rethrow unhandledRejections if (typeof process !== 'undefined') { process.on('unhandledRejection', function (reason) { @@ -51,4 +49,4 @@ function enableFailureOnUnhandledPromiseRejection() { typeof (console.error || console.log) === 'function') { (console.error || console.log)('Unhandled rejections will be ignored!') } -}
\ No newline at end of file +} |