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

Make test more robust by waiting till redis answered

The former fix was actually not working as expected
This commit is contained in:
Ruben Bridgewater
2016-03-26 15:42:03 +01:00
parent 68f2a8894e
commit 2e68a7a270

View File

@@ -99,10 +99,12 @@ describe("The 'multi' method", function () {
describe('when not connected', function () { describe('when not connected', function () {
beforeEach(function (done) { beforeEach(function (done) {
var end = helper.callFuncAfter(done, 2);
client = redis.createClient.apply(null, args); client = redis.createClient.apply(null, args);
client.once('ready', function () { client.once('ready', function () {
client.quit(done); client.quit(end);
}); });
client.once('end', end);
}); });
it('reports an error', function (done) { it('reports an error', function (done) {