@@ -5,6 +5,33 @@ var config = require("../lib/config");
5
5
var helper = require ( "../helper" ) ;
6
6
var redis = config . redis ;
7
7
8
+ function setupData ( client , done ) {
9
+ client . rpush ( 'y' , 'd' ) ;
10
+ client . rpush ( 'y' , 'b' ) ;
11
+ client . rpush ( 'y' , 'a' ) ;
12
+ client . rpush ( 'y' , 'c' ) ;
13
+
14
+ client . rpush ( 'x' , '3' ) ;
15
+ client . rpush ( 'x' , '9' ) ;
16
+ client . rpush ( 'x' , '2' ) ;
17
+ client . rpush ( 'x' , '4' ) ;
18
+
19
+ client . set ( 'w3' , '4' ) ;
20
+ client . set ( 'w9' , '5' ) ;
21
+ client . set ( 'w2' , '12' ) ;
22
+ client . set ( 'w4' , '6' ) ;
23
+
24
+ client . set ( 'o2' , 'buz' ) ;
25
+ client . set ( 'o3' , 'foo' ) ;
26
+ client . set ( 'o4' , 'baz' ) ;
27
+ client . set ( 'o9' , 'bar' ) ;
28
+
29
+ client . set ( 'p2' , 'qux' ) ;
30
+ client . set ( 'p3' , 'bux' ) ;
31
+ client . set ( 'p4' , 'lux' ) ;
32
+ client . set ( 'p9' , 'tux' , done ) ;
33
+ }
34
+
8
35
describe ( "The 'sort' method" , function ( ) {
9
36
10
37
helper . allTests ( function ( parser , ip , args ) {
@@ -100,31 +127,4 @@ describe("The 'sort' method", function () {
100
127
} ) ;
101
128
} ) ;
102
129
103
- function setupData ( client , done ) {
104
- client . rpush ( 'y' , 'd' ) ;
105
- client . rpush ( 'y' , 'b' ) ;
106
- client . rpush ( 'y' , 'a' ) ;
107
- client . rpush ( 'y' , 'c' ) ;
108
-
109
- client . rpush ( 'x' , '3' ) ;
110
- client . rpush ( 'x' , '9' ) ;
111
- client . rpush ( 'x' , '2' ) ;
112
- client . rpush ( 'x' , '4' ) ;
113
-
114
- client . set ( 'w3' , '4' ) ;
115
- client . set ( 'w9' , '5' ) ;
116
- client . set ( 'w2' , '12' ) ;
117
- client . set ( 'w4' , '6' ) ;
118
-
119
- client . set ( 'o2' , 'buz' ) ;
120
- client . set ( 'o3' , 'foo' ) ;
121
- client . set ( 'o4' , 'baz' ) ;
122
- client . set ( 'o9' , 'bar' ) ;
123
-
124
- client . set ( 'p2' , 'qux' ) ;
125
- client . set ( 'p3' , 'bux' ) ;
126
- client . set ( 'p4' , 'lux' ) ;
127
- client . set ( 'p9' , 'tux' , done ) ;
128
- }
129
-
130
130
} ) ;
0 commit comments