From eb679b1ee31f798db13af669e42e84bdd6158d19 Mon Sep 17 00:00:00 2001 From: juergba Date: Tue, 19 Feb 2019 14:53:14 +0100 Subject: [PATCH] runnable.js: fix async skip() --- lib/runnable.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/runnable.js b/lib/runnable.js index 026ab06b40..2628db2ef8 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -343,11 +343,7 @@ Runnable.prototype.run = function(fn) { // allows skip() to be used in an explicit async context this.skip = function asyncSkip() { - done(new Pending('async skip call')); - // halt execution. the Runnable will be marked pending - // by the previous call, and the uncaught handler will ignore - // the failure. - throw new Pending('async skip; aborting execution'); + return done(new Pending('async skip call')); }; if (this.allowUncaught) {