We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there again. I have another difference in behavior for HMSET command in redis-mock compared to redis package.
When redis-mock is used to HMSET an 'empty' object as payload on a key, it will return undefined, but it won't call the callback.
const redisMock = require('redis-mock') const mdb = redisMock.createClient() mdb.hmset('hello', {}, function() { console.log('done', arguments) } ) ==> undefined
When you use the redis package, the command itself returns true, but callback throws an error.
const redis = require('redis') const rdb = redis.createClient() rdb.hmset('hello', {}, function() { console.log('done', arguments) } ) ==> true > done [Arguments] { '0': ReplyError: ERR wrong number of arguments for 'hmset' command at parseError (/var/www/kawa/app/node_modules/redis-parser/lib/parser.js:179:12) at parseType (/var/www/kawa/app/node_modules/redis-parser/lib/parser.js:302:14) { command: 'HMSET', args: [ 'hello' ], code: 'ERR' }, '1': undefined }
Runtime: node.js v16.13.1
Npm packages: redis-mock v0.56.3 redis v3.1.2
I will work on the PR for this, unless you want more details or have other suggestions.
The text was updated successfully, but these errors were encountered:
closes yeahoffline#205
42d989a
Successfully merging a pull request may close this issue.
Hi there again. I have another difference in behavior for HMSET command in redis-mock compared to redis package.
When redis-mock is used to HMSET an 'empty' object as payload on a key, it will return undefined, but it won't call the callback.
When you use the redis package, the command itself returns true, but callback throws an error.
Runtime:
node.js v16.13.1
Npm packages:
redis-mock v0.56.3
redis v3.1.2
I will work on the PR for this, unless you want more details or have other suggestions.
The text was updated successfully, but these errors were encountered: