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

@@ -7,12 +7,6 @@ var uuid = require('uuid');
describe("The 'mset' 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 () {
@@ -102,7 +96,7 @@ describe("The 'mset' method", function () {
describe("with undefined 'key' and missing 'value' parameter", function () {
// this behavior is different from the 'set' behavior.
it("throws an error", function (done) {
var mochaListener = removeMochaListener();
var mochaListener = helper.removeMochaListener();
process.once('uncaughtException', function (err) {
process.on('uncaughtException', mochaListener);
@@ -116,7 +110,7 @@ describe("The 'mset' method", function () {
describe("with undefined 'key' and defined 'value' parameters", function () {
it("throws an error", function () {
var mochaListener = removeMochaListener();
var mochaListener = helper.removeMochaListener();
process.once('uncaughtException', function (err) {
process.on('uncaughtException', mochaListener);