Open gurupras opened 4 years ago
I think this is caused by an issue in lib/client/redis-client.js
where the del
function does not correctly handle multiple arguments. Instead of
RedisClient.prototype.del = RedisClient.prototype.DEL = function (keys, callback) {
this._selectedDb.del(keys, callback);
};
it should be
RedisClient.prototype.del = RedisClient.prototype.DEL = function (keys, callback) {
const args = getKeysVarArgs(arguments);
keys = args.keys;
callback = args.callback;
this._selectedDb.del(keys, callback);
};
but it requires a tweak to getKeysVarArgs
as well. I've submitted a PR that addresses this.
I'm new to Redis in general, but have been using
redis-mock
in the past to test my code. Recently, in one of my redis libraries, I ran into a strange scenario where a test would repeatedly fail when usingredis-mock
but would pass when using an actual Redis server.The following test times out every time regardless of the timeout interval.
environment node: v12.13.0 redis-mock: 0.49.0 jest: 26.0.1 @babel/core: 7.9.6 babel-jest: 26.0.1