1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

fix: test on old node versions

This commit is contained in:
Ruben Bridgewater
2017-08-01 00:36:12 -03:00
parent 6694c91b54
commit 1380ad67a3

View File

@@ -25,10 +25,12 @@ describe('The node_redis client', function () {
var command = 'really-new.command'; var command = 'really-new.command';
assert.strictEqual(Redis.prototype[command], undefined); assert.strictEqual(Redis.prototype[command], undefined);
redis.addCommand(command); redis.addCommand(command);
assert.strictEqual(Redis.prototype[command].name, 'really_new_command'); if (Redis.prototype[command].name !== '') {
assert.strictEqual(Redis.prototype[command.toUpperCase()].name, 'really_new_command'); assert.strictEqual(Redis.prototype[command].name, 'really_new_command');
assert.strictEqual(Redis.prototype.really_new_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.REALLY_NEW_COMMAND.name, 'really_new_command');
}
}); });
}); });