Skip to content

Commit

Permalink
runnable.js: fix async skip()
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Feb 21, 2019
1 parent b7cfceb commit eb679b1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/runnable.js
Expand Up @@ -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) {
Expand Down

0 comments on commit eb679b1

Please sign in to comment.