1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/test/lib/config.js
Erin Spiceland 2b44245056 Add example test with grunt and mocha.
Add test for reconnect.

Run each test for both parsers and both IP versions.

Don't save a reference to this nodified assertion function.

Add DEBUG env var which enables extra debug logging in node_redis.

Remove Grunt, run Redis on 6378 for non-interference.

Remove the tests already ported to Mocha.

Port reconnect after pubsub test; add subscribed after reconnect test.

Reconnet after pubsub test confused me. I don't think it tested
anything, and it didn't pass for me after I ported it. I've disabled it
and added a note. In its place, I've added a test to make sure we are
still subscribed and can receive pubsub messages after a reconnect.

Move test suite config-like stuff into a library.

Move test suite createClient args generation into the config library.

WIP. Some select tests, most disabled and still WIP.
2015-08-14 21:30:12 -07:00

31 lines
700 B
JavaScript

module.exports = (function () {
var redis = require('../../index');
redis.debug_mode = process.env.DEBUG ? JSON.parse(process.env.DEBUG) : false;
var config = {
redis: redis,
PORT: 6378,
HOST: {
IPv4: "127.0.0.1",
IPv6: "::1"
}
};
config.configureClient = function (parser, ip, isSocket) {
var args = [];
if (!isSocket) {
args.push(config.PORT);
args.push(config.HOST[ip]);
args.push({ family: ip, parser: parser });
} else {
args.push(ip);
args.push({ parser: parser });
}
return args;
};
return config;
})();