You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix incorrect code for eslint rules (#1367)
* fix code for eslint rules
This commit is contained in:
committed by
Ruben Bridgewater
parent
128ca62346
commit
50b4009005
@@ -72,7 +72,7 @@ describe("The 'select' method", function () {
|
|||||||
assert.strictEqual(client.selected_db, undefined, 'default db should be undefined');
|
assert.strictEqual(client.selected_db, undefined, 'default db should be undefined');
|
||||||
client.select(9999, function (err) {
|
client.select(9999, function (err) {
|
||||||
assert.equal(err.code, 'ERR');
|
assert.equal(err.code, 'ERR');
|
||||||
assert((err.message == 'ERR DB index is out of range' || err.message == 'ERR invalid DB index'));
|
assert((err.message === 'ERR DB index is out of range' || err.message === 'ERR invalid DB index'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -97,7 +97,7 @@ describe("The 'select' method", function () {
|
|||||||
|
|
||||||
client.on('error', function (err) {
|
client.on('error', function (err) {
|
||||||
assert.strictEqual(err.command, 'SELECT');
|
assert.strictEqual(err.command, 'SELECT');
|
||||||
assert((err.message == 'ERR DB index is out of range' || err.message == 'ERR invalid DB index'));
|
assert((err.message === 'ERR DB index is out of range' || err.message === 'ERR invalid DB index'));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -40,7 +40,8 @@ function waitForRedis (available, cb, port) {
|
|||||||
throw new Error('Redis could not start on port ' + (port || config.PORT) + '\n');
|
throw new Error('Redis could not start on port ' + (port || config.PORT) + '\n');
|
||||||
}
|
}
|
||||||
running = false;
|
running = false;
|
||||||
}).catch(function (err) {
|
}
|
||||||
|
).catch(function (err) {
|
||||||
console.error('\x1b[31m' + err.stack + '\x1b[0m\n');
|
console.error('\x1b[31m' + err.stack + '\x1b[0m\n');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
@@ -110,17 +110,17 @@ describe('TLS connection tests', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('using rediss as url protocol', function (done) {
|
describe('using rediss as url protocol', function (done) {
|
||||||
var tls_connect = tls.connect
|
var tls_connect = tls.connect;
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
tls.connect = function (options) {
|
tls.connect = function (options) {
|
||||||
options = utils.clone(options)
|
options = utils.clone(options);
|
||||||
options.ca = tls_options.ca;
|
options.ca = tls_options.ca;
|
||||||
return tls_connect.call(tls, options);
|
return tls_connect.call(tls, options);
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
tls.connect = tls_connect;
|
tls.connect = tls_connect;
|
||||||
})
|
});
|
||||||
it('connect with tls when rediss is used as the protocol', function (done) {
|
it('connect with tls when rediss is used as the protocol', function (done) {
|
||||||
if (skip) this.skip();
|
if (skip) this.skip();
|
||||||
client = redis.createClient('rediss://localhost:' + tls_port);
|
client = redis.createClient('rediss://localhost:' + tls_port);
|
||||||
@@ -129,7 +129,7 @@ describe('TLS connection tests', function () {
|
|||||||
client.set('foo', 'bar');
|
client.set('foo', 'bar');
|
||||||
client.get('foo', helper.isString('bar', done));
|
client.get('foo', helper.isString('bar', done));
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('fails to connect because the cert is not correct', function (done) {
|
it('fails to connect because the cert is not correct', function (done) {
|
||||||
if (skip) this.skip();
|
if (skip) this.skip();
|
||||||
|
Reference in New Issue
Block a user