Comparing version 3.0.21 to 3.0.22
@@ -116,3 +116,3 @@ /*global Map Promise Set*/ | ||
.then(function() { | ||
return a | ||
return sig.value === undefined ? a : sig.value | ||
}) | ||
@@ -119,0 +119,0 @@ |
@@ -0,1 +1,2 @@ | ||
/*global Promise*/ | ||
/* eslint-env jest */ | ||
@@ -116,2 +117,16 @@ | ||
test("on value (from promise)", function(done) { | ||
dot.on("a.b", "c", function(prop, arg, dot, e, sig) { | ||
return new Promise(function(resolve) { | ||
sig.value = "hi" | ||
resolve() | ||
}) | ||
}) | ||
dot("a.b.c", {}).then(function(arg) { | ||
expect(arg).toBe("hi") | ||
done() | ||
}) | ||
}) | ||
test("onAny empty", function() { | ||
@@ -118,0 +133,0 @@ var called |
{ | ||
"name": "dot-event", | ||
"version": "3.0.21", | ||
"version": "3.0.22", | ||
"description": "Powerful event emitter", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
12389
386