summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2016-04-19 14:39:22 -0400
committerJudah Schvimer <judah@mongodb.com>2016-04-19 14:39:22 -0400
commit05cc484b53c57b48de1cd537461614d96ce3c7c9 (patch)
tree88111942471048586b29b852434521366589661e
parenta43b64811a0ce3edc798c18612a91e2460a6414c (diff)
downloadmongo-05cc484b53c57b48de1cd537461614d96ce3c7c9.tar.gz
fix lint
-rw-r--r--jstests/noPassthrough/count_helper_read_preference.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/jstests/noPassthrough/count_helper_read_preference.js b/jstests/noPassthrough/count_helper_read_preference.js
index b888107ccd6..a049e586598 100644
--- a/jstests/noPassthrough/count_helper_read_preference.js
+++ b/jstests/noPassthrough/count_helper_read_preference.js
@@ -5,11 +5,15 @@
var commandsRan = [];
// Create a new DB object backed by a mock connection.
- function MockMongo() {};
+ function MockMongo() {
+ }
MockMongo.prototype = Mongo.prototype;
MockMongo.prototype.runCommand = function(db, cmd, opts) {
- commandsRan.push({db: db, cmd: cmd, opts:opts});
- return {ok: 1, n: 100};
+ commandsRan.push({db: db, cmd: cmd, opts: opts});
+ return {
+ ok: 1,
+ n: 100
+ };
};
var db = new DB(new MockMongo(), "test");
@@ -31,10 +35,8 @@
// Check that we have wrapped the command and attached the read preference.
assert.eq(commandsRan.length, 1);
- assert.docEq(commandsRan[0].cmd,
- {query: {count: "foo",
- fields: {},
- query: {}},
- $readPreference: {mode: "secondary"}});
+ assert.docEq(
+ commandsRan[0].cmd,
+ {query: {count: "foo", fields: {}, query: {}}, $readPreference: {mode: "secondary"}});
})();