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

Deprecate and warn on null / undefined arguments

This commit is contained in:
Ruben Bridgewater
2015-12-06 03:50:18 +01:00
parent 16a1d69c82
commit e89bcec1c2
7 changed files with 43 additions and 41 deletions

View File

@@ -113,7 +113,7 @@ describe("The 'set' method", function () {
describe("with undefined 'key' and missing 'value' parameter", function () {
it("emits an error without callback", function (done) {
client.on('error', function (err) {
assert.equal(err.message, 'send_command: SET value must not be undefined or null');
assert.equal(err.message, "ERR wrong number of arguments for 'set' command");
assert.equal(err.command, 'SET');
done();
});
@@ -132,13 +132,10 @@ describe("The 'set' method", function () {
it("emit an error without any parameters", function (done) {
client.once("error", function (err) {
assert.equal(err.message, 'send_command: SET value must not be undefined or null');
assert.equal(err.message, "ERR wrong number of arguments for 'set' command");
assert.equal(err.command, 'SET');
done();
});
// This was not supported not to throw earlier and was added by the test refactoring
// https://github.com/NodeRedis/node_redis/commit/eaca486ab1aecd1329f7452ad2f2255b1263606f
client.set();
});
});