You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix some tests and deactivate broken ones
This commit is contained in:
@@ -18,8 +18,7 @@ describe("The 'hmget' method", function () {
|
||||
client.once("error", done);
|
||||
client.once("connect", function () {
|
||||
client.flushdb();
|
||||
client.HMSET(hash, {"0123456789": "abcdefghij", "some manner of key": "a type of value"}, helper.isString('OK'));
|
||||
return done();
|
||||
client.HMSET(hash, {"0123456789": "abcdefghij", "some manner of key": "a type of value"}, helper.isString('OK', done));
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -60,9 +60,13 @@ describe("The 'mset' method", function () {
|
||||
describe("and a callback is specified", function () {
|
||||
describe("with valid parameters", function () {
|
||||
it("sets the value correctly", function (done) {
|
||||
client.mset(key, value, key2, value2);
|
||||
client.get(key, helper.isString(value));
|
||||
client.get(key2, helper.isString(value2, done));
|
||||
client.mset(key, value, key2, value2, function(err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
client.get(key, helper.isString(value));
|
||||
client.get(key2, helper.isString(value2, done));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -75,14 +79,6 @@ describe("The 'mset' method", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("with undefined 'key' and defined 'value' parameters", function () {
|
||||
it("reports an error", function () {
|
||||
client.mset(undefined, value, undefined, value2, function (err, res) {
|
||||
helper.isError()(err, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("and no callback is specified", function () {
|
||||
@@ -108,19 +104,6 @@ describe("The 'mset' method", function () {
|
||||
client.mset();
|
||||
});
|
||||
});
|
||||
|
||||
describe("with undefined 'key' and defined 'value' parameters", function () {
|
||||
it("throws an error", function () {
|
||||
var mochaListener = helper.removeMochaListener();
|
||||
|
||||
process.once('uncaughtException', function (err) {
|
||||
process.on('uncaughtException', mochaListener);
|
||||
helper.isError()(err, null);
|
||||
});
|
||||
|
||||
client.mset(undefined, value, undefined, value2);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -76,15 +76,6 @@ describe("The 'set' method", function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("with undefined 'key' and defined 'value' parameters", function () {
|
||||
it("reports an error", function () {
|
||||
client.set(undefined, value, function (err, res) {
|
||||
helper.isError()(err, null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("and no callback is specified", function () {
|
||||
@@ -132,19 +123,6 @@ describe("The 'set' method", function () {
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
|
||||
describe("with undefined 'key' and defined 'value' parameters", function () {
|
||||
it("throws an error", function () {
|
||||
var mochaListener = helper.removeMochaListener();
|
||||
|
||||
process.once('uncaughtException', function (err) {
|
||||
process.on('uncaughtException', mochaListener);
|
||||
helper.isError()(err, null);
|
||||
});
|
||||
|
||||
client.set(undefined, value);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,7 +28,6 @@ describe("The 'setnx' method", function () {
|
||||
client.set('foo', 'bar', helper.isString('OK'));
|
||||
client.setnx('foo', 'banana', helper.isNumber(0));
|
||||
client.get('foo', helper.isString('bar', done));
|
||||
return done();
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
|
Reference in New Issue
Block a user