Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixing the spec reporter's numbering

Attila Domokos0bcb0bcfe1b7
diff --git a/lib/reporters/spec.js b/lib/reporters/spec.js
index 390bf9d4..e546314d 100644
--- a/lib/reporters/spec.js
+++ b/lib/reporters/spec.js
@@ -74,7 +74,7 @@ function Spec(runner) {
runner.on('fail', function(test, err){
cursor.CR();
- console.log(indent() + color('fail', ' %d) %s'), n++, test.title);
+ console.log(indent() + color('fail', ' %d) %s'), ++n, test.title);
});
runner.on('end', self.epilogue.bind(self));