Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "cls-q", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Make your promises play nice with the continuation-local-storage module.", | ||
@@ -34,5 +34,5 @@ "main": "shim.js", | ||
"peerDependencies": { | ||
"continuation-local-storage": "~2", | ||
"continuation-local-storage": "~3", | ||
"q": ">=0.9.7" | ||
} | ||
} |
@@ -23,3 +23,3 @@ 'use strict'; | ||
t.equal(parsed.id, key, "retrieved correct value"); | ||
t.equal(ns.get('id'), -1, "inner context value isn't available"); | ||
t.notOk(ns.get('id'), "inner context value isn't available"); | ||
@@ -42,6 +42,6 @@ if (parsed) { | ||
fetch(ns.get('id')).then(function () { | ||
t.equal(ns.get('id'), -1, "inner context value is lost in resolved"); | ||
t.notOk(ns.get('id'), "inner context value is lost in resolved"); | ||
client.end(); | ||
}).fail(function (error) { | ||
t.equal(ns.get('id'), -1, "inner context value is lost in failed"); | ||
t.notOk(ns.get('id'), "inner context value is lost in failed"); | ||
t.fail(error); | ||
@@ -52,10 +52,9 @@ }); | ||
// set a sentinel value | ||
ns.set('id', -1); | ||
ns.run(function () { | ||
var saved = Q.defer(); | ||
var data = JSON.stringify({id : 1}); | ||
client.set(1, data, saved.resolve.bind(saved)); | ||
var saved = Q.defer(); | ||
var data = JSON.stringify({id : 1}); | ||
client.set(1, data, saved.resolve.bind(saved)); | ||
Q.when(saved).then(test); | ||
Q.when(saved).then(test); | ||
}); | ||
}); | ||
@@ -112,10 +111,9 @@ | ||
// set a sentinel value | ||
ns.set('id', -1); | ||
ns.run(function () { | ||
var saved = Q.defer(); | ||
var data = JSON.stringify({id : 1}); | ||
client.set(1, data, saved.resolve.bind(saved)); | ||
var saved = Q.defer(); | ||
var data = JSON.stringify({id : 1}); | ||
client.set(1, data, saved.resolve.bind(saved)); | ||
Q.when(saved).then(test); | ||
Q.when(saved).then(test); | ||
}); | ||
}); |
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
5337