Skip to content

Commit 987e4f8

Browse files
author
Ruben Bridgewater
committed
Add hiredis to the tests if it's present
1 parent 0f43aa5 commit 987e4f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/helper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ module.exports = {
113113
}
114114
var parsers = ['javascript'];
115115
var protocols = ['IPv4'];
116-
if (process.platform !== 'win32') {
116+
try {
117+
require('hiredis');
117118
parsers.push('hiredis');
119+
} catch (e) {}
120+
if (process.platform !== 'win32') {
118121
protocols.push('IPv6', '/tmp/redis.sock');
119122
}
120123
var options = [{

0 commit comments

Comments
 (0)