We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed3fc5 commit fb1e083Copy full SHA for fb1e083
2 files changed
lib/runnable.js
@@ -324,8 +324,11 @@ Runnable.prototype.run = function (fn) {
324
}
325
326
if (this.allowUncaught) {
327
- callFn(this.fn);
328
- done();
+ if (this.isPending()) {
+ done();
329
+ } else {
330
+ callFn(this.fn);
331
+ }
332
return;
333
334
lib/runner.js
@@ -432,15 +432,14 @@ Runner.prototype.runTest = function (fn) {
432
if (this.asyncOnly) {
433
test.asyncOnly = true;
434
435
-
+ test.on('error', function (err) {
436
+ self.fail(test, err);
437
+ });
438
439
test.allowUncaught = true;
440
return test.run(fn);
441
442
try {
- test.on('error', function (err) {
- self.fail(test, err);
443
- });
444
test.run(fn);
445
} catch (err) {
446
fn(err);
0 commit comments