Skip to content

armgit / mocha

Public Imported from GitHub
0

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

runnable instrumentation

Tj Holowaychuk0aa4ad7ca805
diff --git a/lib/runnable.js b/lib/runnable.js
index feaf965d..d3977d11 100644
--- a/lib/runnable.js
+++ b/lib/runnable.js
@@ -3,7 +3,8 @@
* Module dependencies.
*/
-var EventEmitter = require('events').EventEmitter;
+var EventEmitter = require('events').EventEmitter
+ , debug = require('debug')('runnable');
/**
* Expose `Runnable`.
@@ -43,6 +44,7 @@ Runnable.prototype.__proto__ = EventEmitter.prototype;
Runnable.prototype.timeout = function(ms){
if (0 == arguments.length) return this._timeout;
+ debug('runnable timeout %d', ms);
this._timeout = ms;
return this;
};
diff --git a/lib/suite.js b/lib/suite.js
index d1995bc7..512a9973 100644
--- a/lib/suite.js
+++ b/lib/suite.js
@@ -99,7 +99,7 @@ Suite.prototype.clone = function(){
Suite.prototype.timeout = function(ms){
if (String(ms).match(/s$/)) ms = parseFloat(ms) * 1000;
- debug('timeout %d', ms);
+ debug('suite timeout %d', ms);
this._timeout = parseInt(ms, 10);
return this;
};