You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Merge branch 'master' into hiredis-merge
This commit is contained in:
8
test.js
8
test.js
@@ -68,6 +68,10 @@ function require_error(label) {
|
||||
};
|
||||
}
|
||||
|
||||
function is_empty_array(obj) {
|
||||
return Array.isArray(obj) && obj.length === 0;
|
||||
}
|
||||
|
||||
function last(name, fn) {
|
||||
return function (err, results) {
|
||||
fn(err, results);
|
||||
@@ -154,7 +158,7 @@ tests.MULTI_3 = function () {
|
||||
])
|
||||
.scard("some set")
|
||||
.exec(function (err, replies) {
|
||||
assert.deepEqual(replies[2][0], [], name);
|
||||
assert.strictEqual(true, is_empty_array(replies[2][0]), name);
|
||||
next(name);
|
||||
});
|
||||
};
|
||||
@@ -360,7 +364,7 @@ tests.MULTIBULK_ZERO_LENGTH = function () {
|
||||
var name = "MULTIBULK_ZERO_LENGTH";
|
||||
client.KEYS(['users:*'], function (err, results) {
|
||||
assert.strictEqual(null, err, 'error on empty multibulk reply');
|
||||
assert.deepEqual([], results);
|
||||
assert.strictEqual(true, is_empty_array(results), "not an empty array");
|
||||
next(name);
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user