From 75c9c4b04e122aa85003c3f9afe07140663de212 Mon Sep 17 00:00:00 2001 From: Dmitry Maganov Date: Mon, 1 Jul 2019 07:09:00 +0300 Subject: [PATCH] Ensure tests failure on unhandled rejections --- mocha.opts | 1 + package-lock.json | 25 +++++++++++++++++++++++++ package.json | 1 + 3 files changed, 27 insertions(+) diff --git a/mocha.opts b/mocha.opts index 4b51f78..2eb323e 100644 --- a/mocha.opts +++ b/mocha.opts @@ -1,3 +1,4 @@ +--require loud-rejection/register --recursive test/ --timeout 5000 --exit \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f43e4a7..8487130 100644 --- a/package-lock.json +++ b/package-lock.json @@ -195,6 +195,12 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, + "array-find-index": { + "version": "1.0.2", + "resolved": "http://localhost:4873/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -861,6 +867,15 @@ "which": "^1.2.9" } }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "http://localhost:4873/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -3119,6 +3134,16 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "loud-rejection": { + "version": "2.1.0", + "resolved": "http://localhost:4873/loud-rejection/-/loud-rejection-2.1.0.tgz", + "integrity": "sha512-g/6MQxUXYHeVqZ4PGpPL1fS1fOvlXoi7bay0pizmjAd/3JhyXwxzwrnr74yzdmhuerlslbRJ3x7IOXzFz0cE5w==", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.2" + } + }, "make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", diff --git a/package.json b/package.json index 19cf09d..2780df0 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "chai-as-promised": "^7.1.1", "istanbul": "^1.1.0-alpha.1", "knex": "^0.18.1", + "loud-rejection": "^2.1.0", "mocha": "^6.0.0", "semistandard": "^13.0.1", "shx": "^0.3.2",