@@ -11,7 +11,7 @@ describe("The 'client' method", function () {
11
11
var pattern = / a d d r = / ;
12
12
13
13
describe ( "using " + parser + " and " + ip , function ( ) {
14
- var client , client2 ;
14
+ var client ;
15
15
16
16
beforeEach ( function ( done ) {
17
17
client = redis . createClient . apply ( redis . createClient , args ) ;
@@ -20,16 +20,8 @@ describe("The 'client' method", function () {
20
20
} ) ;
21
21
} ) ;
22
22
23
- beforeEach ( function ( done ) {
24
- client2 = redis . createClient . apply ( redis . createClient , args ) ;
25
- client2 . once ( "ready" , function ( ) {
26
- done ( ) ;
27
- } ) ;
28
- } ) ;
29
-
30
23
afterEach ( function ( ) {
31
24
client . end ( true ) ;
32
- client2 . end ( true ) ;
33
25
} ) ;
34
26
35
27
describe ( 'list' , function ( ) {
@@ -62,6 +54,18 @@ describe("The 'client' method", function () {
62
54
} ) ;
63
55
64
56
describe ( 'setname / getname' , function ( ) {
57
+ var client2 ;
58
+
59
+ beforeEach ( function ( done ) {
60
+ client2 = redis . createClient . apply ( redis . createClient , args ) ;
61
+ client2 . once ( "ready" , function ( ) {
62
+ done ( ) ;
63
+ } ) ;
64
+ } ) ;
65
+
66
+ afterEach ( function ( ) {
67
+ client2 . end ( true ) ;
68
+ } ) ;
65
69
66
70
it ( 'sets the name' , function ( done ) {
67
71
helper . serverVersionAtLeast . call ( this , client , [ 2 , 6 , 9 ] ) ;
0 commit comments