You've already forked node-redis
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:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user