You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
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.
This commit is contained in:
committed by
Benjamin Coe
parent
6cae0b880f
commit
2b44245056
30
test/lib/config.js
Normal file
30
test/lib/config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
})();
|
Reference in New Issue
Block a user