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

Make .end flush optional and add some tests

This commit is contained in:
Ruben Bridgewater
2015-09-24 13:27:32 +02:00
parent 4b100b8b64
commit bd4fca130d
5 changed files with 48 additions and 6 deletions

View File

@@ -196,6 +196,14 @@ describe("The 'multi' method", function () {
}).exec(done);
});
it('runs a multi without any further commands', function(done) {
client.multi().exec(function(err, res) {
assert.strictEqual(err, null);
assert.strictEqual(res.length, 0);
done();
});
});
it('allows multiple operations to be performed using a chaining API', function (done) {
client.multi()
.mset('some', '10', 'keys', '20')