-
Notifications
You must be signed in to change notification settings - Fork 31
v.1.2 proposal #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
var Redis = require('ioredis'); | ||
var redis = new Redis(process.env.REDIS_URI); | ||
|
||
redis.command(function (err, res) { | ||
return redis.command().then(function (res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why return
is needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not. It's only my habit of adding a return in front of promises, if not explicitly unwanted.
Comments incorporated |
Cool! And we'd better add some tests for expect(index('migrate', ['127.0.0.1', 6379, 'foo', 0, 0, 'COPY'])).to.eql([2]);
expect(index('migrate', ['127.0.0.1', 6379, '', 0, 0, 'REPLACE', 'KEYS', 'foo', 'bar'])).to.eql([7, 8]);
expect(index('migrate', ['127.0.0.1', 6379, '', 0, 0, 'KEYS', 'foo', 'bar'])).to.eql([6, 7]); |
Tests added including a posttest for 100% coverage by adding istanbul. While being on it I also updated ioredis and found that |
Thanks for the review 😃 |
I added a build sanity check and added
MIGRATE [...] KEYS key1, ...
support.Plus some small cleanup.