yeahoffline / redis-mock

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

Support for multiple redis instances by redis host name and port #133

Closed jgresham closed 4 years ago

jgresham commented 4 years ago

Mocking multiple redis hosts by specifying a different port or host name currently doesn't work. Being able to add entries to one redis instance and keep those entries separate from another redis instance is needed for testing multiple redis client functions. Example:

let client1 = redis.createClient(6379, 'redis-server-1')
let client2 = redis.createClient(6379, 'redis-server-2')
yeahoffline commented 4 years ago

feel free to submit a pr