From 987e4f8a7ca425a4d392b7c04c5139010748249d Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 10 Oct 2015 02:17:31 +0200 Subject: [PATCH] Add hiredis to the tests if it's present --- test/helper.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/helper.js b/test/helper.js index d007676ea6..8402b9cfc0 100644 --- a/test/helper.js +++ b/test/helper.js @@ -113,8 +113,11 @@ module.exports = { } var parsers = ['javascript']; var protocols = ['IPv4']; - if (process.platform !== 'win32') { + try { + require('hiredis'); parsers.push('hiredis'); + } catch (e) {} + if (process.platform !== 'win32') { protocols.push('IPv6', '/tmp/redis.sock'); } var options = [{