Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update mocha (1.7.4)

  • Loading branch information...
commit a01866f1b30658e55d4ffff4b32b949356fa2edd 1 parent 051b623
@jfirebaugh authored
Showing with 20 additions and 6 deletions.
  1. +1 −1  History.md
  2. +1 −1  mocha
  3. +18 −4 vendor/assets/javascripts/mocha.js
View
2  History.md
@@ -1,6 +1,6 @@
# master
-* Update mocha (1.7.3) and chai (1.4.0)
+* Update mocha (1.7.4) and chai (1.4.0)
# 2.1.0
2  mocha
@@ -1 +1 @@
-Subproject commit f744098a55be2ed76f01289d48744f7142e16c4d
+Subproject commit 652df5fba95f3b727cf72628d5a684b3a5cb5cad
View
22 vendor/assets/javascripts/mocha.js
@@ -3269,7 +3269,9 @@ function TAP(runner) {
var self = this
, stats = this.stats
- , n = 1;
+ , n = 1
+ , passes = 0
+ , failures = 1;
runner.on('start', function(){
var total = runner.grepTotal(runner.suite);
@@ -3285,13 +3287,21 @@ function TAP(runner) {
});
runner.on('pass', function(test){
+ passes++;
console.log('ok %d %s', n, title(test));
});
runner.on('fail', function(test, err){
+ failures++;
console.log('not ok %d %s', n, title(test));
console.log(err.stack.replace(/^/gm, ' '));
});
+
+ runner.on('end', function(){
+ console.log('# tests ' + (passes + failures));
+ console.log('# pass ' + passes);
+ console.log('# fail ' + failures);
+ });
}
/**
@@ -3847,7 +3857,7 @@ Runner.prototype.globalProps = function() {
// non-enumerables
for (var i = 0; i < globals.length; ++i) {
- if (~props.indexOf(globals[i])) continue;
+ if (~utils.indexOf(props, globals[i])) continue;
props.push(globals[i]);
}
@@ -4218,7 +4228,9 @@ Runner.prototype.run = function(fn){
// callback
this.on('end', function(){
debug('end');
- process.removeListener('uncaughtException', self.uncaught.bind(self));
+ process.removeListener('uncaughtException', function(err){
+ self.uncaught(err);
+ });
fn(self.failures);
});
@@ -4230,7 +4242,9 @@ Runner.prototype.run = function(fn){
});
// uncaught exception
- process.on('uncaughtException', this.uncaught.bind(this));
+ process.on('uncaughtException', function(err){
+ self.uncaught(err);
+ });
return this;
};
Please sign in to comment.
Something went wrong with that request. Please try again.