Comparing version 0.3.1 to 0.3.2
@@ -26,3 +26,3 @@ var EventEmitter = require('events').EventEmitter; | ||
function builder (saw, xs) { | ||
var context = this.context = { | ||
var context = { | ||
vars : {}, | ||
@@ -29,0 +29,0 @@ args : {}, |
{ | ||
"name" : "seq", | ||
"version" : "0.3.1", | ||
"version" : "0.3.2", | ||
"description" : "Chainable asynchronous flow control with sequential and parallel primitives and pipeline-style error handling", | ||
@@ -5,0 +5,0 @@ "main" : "./index.js", |
@@ -755,1 +755,26 @@ var Seq = require('seq'); | ||
}; | ||
exports.regressionTestForAccidentalDeepTraversalOfTheContext = function () { | ||
// Create a single-item stack with a bunch of references to other objects: | ||
var stack = [{}]; | ||
for (var i = 0 ; i < 10000 ; i += 1) { | ||
stack[0][i] = stack[0]; | ||
} | ||
var startTime = new Date(), | ||
numCalled = 0, | ||
to = setTimeout(function () { | ||
assert.fail('never got to the end of the chain'); | ||
}, 1000); | ||
Seq(stack) | ||
.parEach(function (item) { | ||
numCalled += 1; | ||
this(); | ||
}) | ||
.seq(function () { | ||
clearTimeout(to); | ||
assert.eql(numCalled, 1); | ||
assert.ok((new Date().getTime() - startTime) < 1000, 'if this test takes longer than a second, the bug must have been reintroduced'); | ||
}); | ||
}; |
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
48792
1263