Comparing version 0.0.2 to 0.0.3
@@ -24,2 +24,3 @@ "use strict"; | ||
return this.once('error', function() { | ||
self.halt = true; | ||
self.on('error', function() { }); | ||
@@ -63,2 +64,3 @@ deps.apply(this, arguments); | ||
var item = this._queue[name]; | ||
if (this.halt) return; | ||
if (!item.callback) return; | ||
@@ -65,0 +67,0 @@ if (item.called) return; |
{ | ||
"name": "hostess", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "async by depencency", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
22
test.js
@@ -225,2 +225,24 @@ var hostess = require('./index') | ||
it('should stop after an exception is thrown', function(done) { | ||
var host = hostess(); | ||
host('error', function() { }); | ||
host('first', function() { | ||
throw new Error(); | ||
}); | ||
var secondCalled = false; | ||
host('second', ['first'], function() { | ||
secondCalled = true; | ||
}); | ||
process.nextTick(function() { | ||
if (secondCalled) { | ||
assert.ok(false, 'execution didnt stop after exception was thrown'); | ||
} | ||
done(); | ||
}); | ||
}); | ||
it('should fire a done event', function(done) { | ||
@@ -227,0 +249,0 @@ var host = hostess(); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11559
326
0