From 091abafa9b6bfd26bdbdb89d80213c3b7aed753c Mon Sep 17 00:00:00 2001 From: Dean Chapman Date: Wed, 21 Jun 2017 18:55:18 +0100 Subject: [PATCH] Add --show-events flag to test command --- lib/testing/testrunner.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/testing/testrunner.js b/lib/testing/testrunner.js index 76e08bf..2d12b46 100644 --- a/lib/testing/testrunner.js +++ b/lib/testing/testrunner.js @@ -133,9 +133,12 @@ TestRunner.prototype.startTest = function(mocha, callback) { }; TestRunner.prototype.endTest = function(mocha, callback) { + var self = this; - if (mocha.currentTest.state != "failed") { + var showEvents = self.config["show-events"]; + + if (mocha.currentTest.state != "failed" && !showEvents ) { return callback(); }