Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Enable `this.skip()` within individual test at runtime

Mislav Marohnićdaf461231f1c
diff --git a/lib/runner.js b/lib/runner.js
index 856ac93e..0979bbc2 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -531,6 +531,7 @@ Runner.prototype.runTests = function(suite, fn) {
if (err) {
var retry = test.currentRetry();
if (err instanceof Pending) {
+ test.pending = true;
self.emit('pending', test);
} else if (retry < test.retries()) {
var clonedTest = test.clone();