Skip to content

Commit 19ce668

Browse files
author
Ruben Bridgewater
committed
Prevent jshint race condition
1 parent ff857f9 commit 19ce668

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/commands/sort.spec.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ var config = require("../lib/config");
55
var helper = require("../helper");
66
var redis = config.redis;
77

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+
835
describe("The 'sort' method", function () {
936

1037
helper.allTests(function(parser, ip, args) {
@@ -100,31 +127,4 @@ describe("The 'sort' method", function () {
100127
});
101128
});
102129

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-
130130
});

0 commit comments

Comments
 (0)