yeahoffline / redis-mock

Node.js redis client mock
212 stars 110 forks source link

This library has support to the node-redis version 4 ? #204

Open MichelAraujo opened 2 years ago

himanshum-greatlearning commented 2 years ago

Recently I updated the redis to version 4. Now, the test cases are breaking because redisClient is unable to find the connect method.

Can we please support the newer version of redis ?

idaamit commented 2 years ago

Node Redis version 4 changed several interfaces, which makes this library unusable. for example :

createClient() doesn't automatically connect to server, additional method was added connect() lRange instead of lrange(). rPush instead of rpush().

jwhitlock commented 1 year ago

connect-redis suggests continuing to use the v3 API with legacyMode: true

// redis@v4
const { createClient } = require("redis")
let redisClient = createClient({ legacyMode: true })
redisClient.connect().catch(console.error)

In that case, redis-mock is still compliant.

F3n67u commented 1 year ago

I also want testing support for redis v4 which is the version I am using. I see the last commit of this repo is 2 years ago, is this repo still maintained?

srMarquinho commented 1 year ago

@yeahoffline Any thoughts on this? Thank you.