Comparing version 0.9.2 to 0.10.0
@@ -166,11 +166,11 @@ /** | ||
Hydro.prototype.setup = function() { | ||
var emitter = this.emitter; | ||
var suite = null; | ||
var stackLimit = null; | ||
var self = this; | ||
var formatter = this.get('formatter'); | ||
if (formatter) this.push('plugins', loa(formatter)); | ||
this.loadPlugins(); | ||
this.attachGlobals(); | ||
this.attachProxies(); | ||
this.loadFormatter(); | ||
@@ -326,17 +326,2 @@ if (suite = this.get('suite')) { | ||
/** | ||
* Load the specified formatter if any. | ||
* | ||
* @api private | ||
*/ | ||
Hydro.prototype.loadFormatter = function() { | ||
var name = this.get('formatter'); | ||
var formatter = null; | ||
if (!name) return; | ||
formatter = loa(name); | ||
if (util.isFunction(formatter)) formatter = new formatter; | ||
formatter.use(this); | ||
}; | ||
/** | ||
* Primary exports. | ||
@@ -343,0 +328,0 @@ */ |
@@ -35,12 +35,2 @@ /** | ||
/** | ||
* The root suite can't have any tests. | ||
* | ||
* @api public | ||
*/ | ||
RootSuite.prototype.addTest = function() { | ||
throw new Error('Please add a test suite'); | ||
}; | ||
/** | ||
* The root suite doesn't have any parent suites. | ||
@@ -47,0 +37,0 @@ * |
@@ -60,2 +60,16 @@ /** | ||
/** | ||
* ensure callbacks are called in the correct context | ||
*/ | ||
Base.prototype.on = function(event, fn) { | ||
var self = this | ||
return Emitter.prototype.on.call(this, event, function(done){ | ||
if (fn.length) return fn.call(self.context, done); | ||
try { fn.call(self.context); } | ||
catch (e) { return done(e); } | ||
done(); | ||
}); | ||
}; | ||
/** | ||
* Configure test timeout. | ||
@@ -62,0 +76,0 @@ * |
{ | ||
"name": "hydro", | ||
"version": "0.9.2", | ||
"version": "0.10.0", | ||
"preferGlobal": true, | ||
@@ -5,0 +5,0 @@ "description": "Teeny-weeny test runner for Node.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
981476
2797