Skip to content

Commit 2e68a7a

Browse files
author
Ruben Bridgewater
committed
Make test more robust by waiting till redis answered
The former fix was actually not working as expected
1 parent 68f2a88 commit 2e68a7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/multi.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@ describe("The 'multi' method", function () {
9999
describe('when not connected', function () {
100100

101101
beforeEach(function (done) {
102+
var end = helper.callFuncAfter(done, 2);
102103
client = redis.createClient.apply(null, args);
103104
client.once('ready', function () {
104-
client.quit(done);
105+
client.quit(end);
105106
});
107+
client.once('end', end);
106108
});
107109

108110
it('reports an error', function (done) {

0 commit comments

Comments
 (0)