1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Improve code coverage by adding tests and removing unnecessary code

This commit is contained in:
Ruben Bridgewater
2015-09-03 21:54:57 +02:00
parent b1e51c8c7b
commit 89e1f6f067
10 changed files with 166 additions and 95 deletions

View File

@@ -6,12 +6,6 @@ var redis = config.redis;
describe("The 'select' method", function () {
function removeMochaListener () {
var mochaListener = process.listeners('uncaughtException').pop();
process.removeListener('uncaughtException', mochaListener);
return mochaListener;
}
helper.allTests(function(parser, ip, args) {
describe("using " + parser + " and " + ip, function () {
@@ -96,7 +90,7 @@ describe("The 'select' method", function () {
describe("with an invalid db index", function () {
it("throws an error when callback not provided", function (done) {
var mochaListener = removeMochaListener();
var mochaListener = helper.removeMochaListener();
assert.strictEqual(client.selected_db, null, "default db should be null");
process.once('uncaughtException', function (err) {