☕️ Classic, reliable, trusted test framework for Node.js and the browser
refactor negated conditional with else branch
TJ Holowaychuk556d4e98a629
diff --git a/lib/runnable.js b/lib/runnable.jsindex 1f10ae6d..22b62ba3 100644--- a/lib/runnable.js+++ b/lib/runnable.js@@ -210,10 +210,10 @@ Runnable.prototype.run = function(fn){// sync or promise-returningtry {- if (!this.pending) {- callFn(this.fn);- } else {+ if (this.pending) {done();+ } else {+ callFn(this.fn);}} catch (err) {done(err);