You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Some small code style changes
Revert some done stuff
This commit is contained in:
2
index.js
2
index.js
@@ -955,7 +955,7 @@ RedisClient.prototype.select = function (db, callback) {
|
||||
if (err === null) {
|
||||
self.selected_db = db;
|
||||
}
|
||||
if (typeof(callback) === 'function') {
|
||||
if (typeof callback === 'function') {
|
||||
callback(err, res);
|
||||
} else if (err) {
|
||||
self.emit('error', err);
|
||||
|
@@ -88,9 +88,9 @@ describe("The 'mset' method", function () {
|
||||
describe("and no callback is specified", function () {
|
||||
describe("with valid parameters", function () {
|
||||
it("sets the value correctly", function (done) {
|
||||
client.mset(key, value, key2, value2);
|
||||
client.get(key, helper.isString(value));
|
||||
client.get(key2, helper.isString(value2, done));
|
||||
client.mset(key, value2, key2, value);
|
||||
client.get(key, helper.isString(value2));
|
||||
client.get(key2, helper.isString(value, done));
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -124,19 +124,23 @@ describe("The node_redis client", function () {
|
||||
client.on("connect", function on_connect() {
|
||||
async.parallel([function (cb) {
|
||||
client.get("recon 1", function (err, res) {
|
||||
helper.isString("one", cb)(err, res);
|
||||
helper.isString("one")(err, res);
|
||||
cb();
|
||||
});
|
||||
}, function (cb) {
|
||||
client.get("recon 1", function (err, res) {
|
||||
helper.isString("one", cb)(err, res);
|
||||
helper.isString("one")(err, res);
|
||||
cb();
|
||||
});
|
||||
}, function (cb) {
|
||||
client.get("recon 2", function (err, res) {
|
||||
helper.isString("two", cb)(err, res);
|
||||
helper.isString("two")(err, res);
|
||||
cb();
|
||||
});
|
||||
}, function (cb) {
|
||||
client.get("recon 2", function (err, res) {
|
||||
helper.isString("two", cb)(err, res);
|
||||
helper.isString("two")(err, res);
|
||||
cb();
|
||||
});
|
||||
}], function (err, results) {
|
||||
client.removeListener("connect", on_connect);
|
||||
|
Reference in New Issue
Block a user