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

Fix multi regression. Closes #889

Allow commands being executed after a Multi / Batch was initiated but not yet executed
This commit is contained in:
Ruben Bridgewater
2015-10-14 00:58:27 +02:00
parent 28d343c2ad
commit 60e9d0fdd6
3 changed files with 54 additions and 8 deletions

View File

@@ -72,6 +72,12 @@ describe("The 'batch' method", function () {
});
});
it("runs normal calls inbetween batch", function (done) {
var batch = client.batch();
batch.set("m1", "123");
client.set('m2', '456', done);
});
it("returns an empty array if promisified", function () {
return client.batch().execAsync().then(function(res) {
assert.strictEqual(res.length, 0);