Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Silence Bluebird js warnings

Kris Rasmussen4af3866107cf
diff --git a/lib/runnable.js b/lib/runnable.js
index 07501785..2bc21248 100644
--- a/lib/runnable.js
+++ b/lib/runnable.js
@@ -289,6 +289,9 @@ Runnable.prototype.run = function(fn) {
result
.then(function() {
done();
+ // Return null so libraries like bluebird do not warn about
+ // subsequently constructed Promises.
+ return null;
},
function(reason) {
done(reason || new Error('Promise rejected with no or falsy reason'));