yeahoffline / redis-mock

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

Fix SET to work with NX flag does as expected #202

Open sampsasaarela opened 2 years ago

sampsasaarela commented 2 years ago

On real Redis we will get "OK" on the first call and null on the second, which is expected as the value was set at the first time and cannot be overwritten. Redis-mock will respond with "OK" on the first call, second and any other afterward which is not correct behavior. This will fix it to respond correctly.

Fix: https://github.com/yeahoffline/redis-mock/issues/198

foreverest commented 5 months ago

Can we get this merged please?