summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Yeates <yeatesgraeme@gmail.com>2015-07-11 12:44:45 -0400
committerGraeme Yeates <yeatesgraeme@gmail.com>2015-07-11 12:44:45 -0400
commit55c5ac953674c77c776a13c77a0d3d180098be92 (patch)
tree42325eee21dd17f6bba860e7f01a436d99c90ca4
parent68b4f5b4b7dfb6634f505d79ceb38e517d89ca68 (diff)
downloadasync-55c5ac953674c77c776a13c77a0d3d180098be92.tar.gz
Asyncify handles null values
-rwxr-xr-xtest/test-async.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-async.js b/test/test-async.js
index fdb949b..cf3b67a 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -4235,6 +4235,17 @@ exports['asyncify'] = {
});
},
+ 'asyncify null': function (test) {
+ var parse = async.asyncify(function() {
+ return null;
+ });
+ parse("{\"a\":1}", function (err, result) {
+ test.ok(!err);
+ test.ok(result === null);
+ test.done();
+ });
+ },
+
'variable numbers of arguments': function (test) {
async.asyncify(function (x, y, z) {
test.ok(arguments.length === 3);