Skip to content

Commit f82fb6c

Browse files
author
Ruben Bridgewater
committed
Explicitly install hiredis on appveyor and only use start / end clients if needed
1 parent 6711c94 commit f82fb6c

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ install:
2424
# Get the latest stable version of Node 0.STABLE.latest
2525
- ps: Install-Product node $env:nodejs_version
2626
# Typical npm stuff. Use msvs 2013 for the hiredis parser
27-
- npm install --msvs_version=2013
27+
- npm install hiredis --msvs_version=2013
28+
- npm install
2829

2930
# Post-install test scripts.
3031
test_script:

test/commands/client.spec.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("The 'client' method", function () {
1111
var pattern = /addr=/;
1212

1313
describe("using " + parser + " and " + ip, function () {
14-
var client, client2;
14+
var client;
1515

1616
beforeEach(function (done) {
1717
client = redis.createClient.apply(redis.createClient, args);
@@ -20,16 +20,8 @@ describe("The 'client' method", function () {
2020
});
2121
});
2222

23-
beforeEach(function (done) {
24-
client2 = redis.createClient.apply(redis.createClient, args);
25-
client2.once("ready", function () {
26-
done();
27-
});
28-
});
29-
3023
afterEach(function () {
3124
client.end(true);
32-
client2.end(true);
3325
});
3426

3527
describe('list', function () {
@@ -62,6 +54,18 @@ describe("The 'client' method", function () {
6254
});
6355

6456
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+
});
6569

6670
it('sets the name', function (done) {
6771
helper.serverVersionAtLeast.call(this, client, [2, 6, 9]);

0 commit comments

Comments
 (0)