diff --git a/lib/cluster/index.js b/lib/cluster/index.js index 2e17d935..68a69c6f 100644 --- a/lib/cluster/index.js +++ b/lib/cluster/index.js @@ -22,7 +22,7 @@ var ConnectionPool = require('./connection_pool'); * @param {Object} options * @param {boolean} [options.enableOfflineQueue=true] - See Redis class * @param {boolean} [options.lazyConnect=false] - See Redis class - * @param {string} [options.scaleReads="masters"] - Scale reads to the node with the specified role. + * @param {string} [options.scaleReads=masters] - Scale reads to the node with the specified role. * Available values are "masters", "slaves" and "all". * @param {number} [options.maxRedirections=16] - When a MOVED or ASK error is received, client will redirect the * command to another node. This option limits the max redirections allowed to send a command. @@ -215,7 +215,7 @@ Cluster.prototype.disconnect = function (reconnect) { /** * Get nodes with the specified role * - * @param {string} [role="all"] - role, "masters", "slaves" or "all" + * @param {string} [role=all] - role, "masters", "slaves" or "all" * @return {Redis[]} array of nodes * @public */ diff --git a/test/unit/cluster.js b/test/unit/cluster.js index f4d46a00..bbbd40c3 100644 --- a/test/unit/cluster.js +++ b/test/unit/cluster.js @@ -19,7 +19,7 @@ describe('cluster', function () { var cluster = new Cluster([{ port: 7777 }], options); expect(cluster.options).to.have.property('showFriendlyErrorStack', false); expect(cluster.options).to.have.property('showFriendlyErrorStack', false); - expect(cluster.options).to.have.property('readOnly', false); + expect(cluster.options).to.have.property('scaleReads', 'masters'); }); it('should throw when startupNodes is not an array or is empty', function () {