continuation-local-storage
Advanced tools
Comparing version 3.1.1 to 3.1.2
{ | ||
"name": "continuation-local-storage", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "userland implementation of https://github.com/joyent/node/issues/5243", | ||
@@ -33,8 +33,6 @@ "main": "context.js", | ||
}, | ||
"optionalDependencies": { | ||
"dependencies": { | ||
"emitter-listener": "1.0.1", | ||
"async-listener": "0.4.7" | ||
}, | ||
"dependencies": { | ||
"emitter-listener": "1.0.1" | ||
} | ||
} |
@@ -16,5 +16,5 @@ 'use strict'; | ||
test("event emitters bound to CLS context", function (t) { | ||
t.plan(12); | ||
t.plan(13); | ||
t.test("handler registered in context", function (t) { | ||
t.test("handler registered in context, emit out of context", function (t) { | ||
t.plan(1); | ||
@@ -55,3 +55,3 @@ | ||
t.test("handler registered out of context", function (t) { | ||
t.test("handler registered out of context, emit in context", function (t) { | ||
t.plan(1); | ||
@@ -94,2 +94,21 @@ | ||
t.test("handler registered out of context, emit out of context", function (t) { | ||
t.plan(1); | ||
var n = fresh('out', this) | ||
, ee = new EventEmitter() | ||
; | ||
ee.on('event', function () { | ||
t.equal(n.get('value'), undefined, "no context."); | ||
}); | ||
n.run(function () { | ||
n.set('value', 'hello'); | ||
n.bindEmitter(ee); | ||
}); | ||
ee.emit('event'); | ||
}); | ||
t.test("once handler registered out of context on Readable", function (t) { | ||
@@ -96,0 +115,0 @@ var Readable = require('stream').Readable; |
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
92485
2068
+ Addedasync-listener@0.4.7