You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using redis-mock to write integration tests with Redis. In fact, I run two integration tests: one with real Redis client and another one with redis-mock.
When I try to do something like this: redisClient.hset(collection_name, key, myJsonObject, callback);
I get discrepancies in the behavior between real Redis and redis-mock.
Namely, real Redis client converts my myJsonObject to string representation by calling myJsonObject.toString() while redis-mock client stores myJsonObject as an original JSON/JavaScript object.
So, when I retrieve myJsonObject back, with real Redis I get something like this "[object Object]", but with redis-mock I get the "original" JSON/JavaScript object as is (as it was inserted in).
So, the problem is: why redis-mock stores myJsonObject as is instead of storing myJsonObject.toString() ?
The text was updated successfully, but these errors were encountered:
I'm using redis-mock to write integration tests with Redis. In fact, I run two integration tests: one with real Redis client and another one with redis-mock.
When I try to do something like this:
redisClient.hset(collection_name, key, myJsonObject, callback);
I get discrepancies in the behavior between real Redis and redis-mock.
Namely, real Redis client converts my
myJsonObject
to string representation by callingmyJsonObject.toString()
while redis-mock client storesmyJsonObject
as an original JSON/JavaScript object.So, when I retrieve
myJsonObject
back, with real Redis I get something like this"[object Object]"
, but with redis-mock I get the "original" JSON/JavaScript object as is (as it was inserted in).So, the problem is: why redis-mock stores
myJsonObject
as is instead of storingmyJsonObject.toString()
?The text was updated successfully, but these errors were encountered: