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

Remove try callbacks and emit an error in case of no callback has been provided

This commit is contained in:
Ruben Bridgewater
2015-09-03 21:57:13 +02:00
parent 1b261fcaad
commit c6ae7832a3
2 changed files with 15 additions and 44 deletions

View File

@@ -118,6 +118,14 @@ describe("The 'eval' method", function () {
helper.serverVersionAtLeast.call(this, client, [2, 5, 0]);
client.evalsha('ffffffffffffffffffffffffffffffffffffffff', 0, helper.isError(done));
});
it('emits an error if SHA does not exist and no callback has been provided', function (done) {
client.on('error', function (err) {
assert.equal(err.message, 'NOSCRIPT No matching script. Please use EVAL.');
done();
});
client.evalsha('ffffffffffffffffffffffffffffffffffffffff', 0);
});
});
it('allows a key to be incremented, and performs appropriate conversion from LUA type', function (done) {