1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

moved tests for specific commands into the /commands sub-folder, put a ton of tests around the multi command

This commit is contained in:
Benjamin Coe
2015-07-16 00:00:59 -07:00
parent eaca486ab1
commit 071b3ff27c
13 changed files with 311 additions and 81 deletions

View File

@@ -56,5 +56,15 @@ module.exports = {
return true;
};
}
},
serverVersionAtLeast: function (connection, desired_version) {
// Return true if the server version >= desired_version
var version = connection.server_info.versions;
for (var i = 0; i < 3; i++) {
if (version[i] > desired_version[i]) return true;
if (version[i] < desired_version[i]) return false;
}
return true;
}
};