Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Changing the 0 based error number to 1

Attila Domokos9b038f59b7a0
diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index df09b43a..6ab03bad 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -137,7 +137,7 @@ exports.list = function(failures){
stack = stack.slice(index + 1)
.replace(/^/gm, ' ');
- console.error(fmt, i, test.fullTitle(), msg, stack);
+ console.error(fmt, (i + 1), test.fullTitle(), msg, stack);
});
};
diff --git a/lib/reporters/list.js b/lib/reporters/list.js
index 0f2943d9..1a889893 100644
--- a/lib/reporters/list.js
+++ b/lib/reporters/list.js
@@ -51,7 +51,7 @@ function List(runner) {
runner.on('fail', function(test, err){
cursor.CR();
- console.log(color('fail', ' %d) %s'), n++, test.fullTitle());
+ console.log(color('fail', ' %d) %s'), ++n, test.fullTitle());
});
runner.on('end', self.epilogue.bind(self));