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

Add some more notes and tests

This commit is contained in:
Ruben Bridgewater
2015-10-12 17:21:58 +02:00
parent 352f8a5be3
commit 06f57fd1d9
3 changed files with 71 additions and 5 deletions

View File

@@ -63,6 +63,21 @@ describe("The 'batch' method", function () {
client.end();
});
it("returns an empty array", function (done) {
var batch = client.batch();
batch.exec(function (err, res) {
assert.strictEqual(err, null);
assert.strictEqual(res.length, 0);
done();
});
});
it("returns an empty array if promisified", function () {
return client.batch().execAsync().then(function(res) {
assert.strictEqual(res.length, 0);
});
});
it("returns an empty result array", function (done) {
var batch = client.batch();
var async = true;