faeldt / redis-mock

Node.js redis client mock
112 stars 157 forks source link

INCRBY on a non-existent key with a non-integer value should return an ERR #40

Open sobotklp opened 9 years ago

sobotklp commented 9 years ago

If you are using INCRBY on a non-existent key in Redis, the following would return an error:

INCRBY newkey sdgsdfg
-ERR value is not an integer or out of range

The behaviour of redis-mock seems to be that it will return an error if you try to INCRBY again on the same key, because the existing value is not an integer.