You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Fix inconsistent command argument handling
Earlier multi.command and client.command diverged a lot in the way they accepted arguments. This is now consistent This will also fix some bugs like using multi.hmset with arrays
This commit is contained in:
@@ -36,6 +36,20 @@ describe("The 'del' method", function () {
|
||||
client.get('apple', helper.isNull(done));
|
||||
});
|
||||
|
||||
it('allows multiple keys to be deleted with the array syntax', function (done) {
|
||||
client.mset('foo', 'bar', 'apple', 'banana');
|
||||
client.del(['foo', 'apple'], helper.isNumber(2));
|
||||
client.get('foo', helper.isNull());
|
||||
client.get('apple', helper.isNull(done));
|
||||
});
|
||||
|
||||
it('allows multiple keys to be deleted with the array syntax and no callback', function (done) {
|
||||
client.mset('foo', 'bar', 'apple', 'banana');
|
||||
client.del(['foo', 'apple']);
|
||||
client.get('foo', helper.isNull());
|
||||
client.get('apple', helper.isNull(done));
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
});
|
||||
|
Reference in New Issue
Block a user