From ad8355a1372240b5ceb5ae3acde54bc7171b562a Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 1 Aug 2017 00:25:52 -0300 Subject: [PATCH] fix: add command tests --- test/node_redis.spec.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/node_redis.spec.js b/test/node_redis.spec.js index 758e5c89d9..95c8bdef7b 100644 --- a/test/node_redis.spec.js +++ b/test/node_redis.spec.js @@ -12,7 +12,9 @@ var client; describe('The node_redis client', function () { - describe.only("The 'add_command' method", function () { + describe("The 'add_command' method", function () { + + var Redis = redis.RedisClient; it('camel case and snakeCase version exists', function () { assert.strictEqual(typeof redis.addCommand, 'function'); @@ -21,12 +23,12 @@ describe('The node_redis client', function () { it('converts special characters in functions names to lowercase', function () { var command = 'really-new.command'; - assert.strictEqual(redis.prototype[command], undefined); + assert.strictEqual(Redis.prototype[command], undefined); redis.addCommand(command); - assert.strictEqual(redis.prototype[command].name, 'really_new_command'); - assert.strictEqual(redis.prototype[command.toUpperCase()].name, 'really_new_command'); - assert.strictEqual(redis.prototype.really_new_command.name, 'really_new_command'); - assert.strictEqual(redis.prototype.REALLY_NEW_COMMAND.name, 'really_new_command'); + assert.strictEqual(Redis.prototype[command].name, 'really_new_command'); + assert.strictEqual(Redis.prototype[command.toUpperCase()].name, 'really_new_command'); + assert.strictEqual(Redis.prototype.really_new_command.name, 'really_new_command'); + assert.strictEqual(Redis.prototype.REALLY_NEW_COMMAND.name, 'really_new_command'); }); });