diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:17:50 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:18:14 -0500 |
commit | 4ae691e8edc87d0e3cfb633bb91c328426be007b (patch) | |
tree | 52079a593f54382ca13a2e741633eab1b6271893 /jstests/noPassthrough/count_helper_read_preference.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/noPassthrough/count_helper_read_preference.js')
-rw-r--r-- | jstests/noPassthrough/count_helper_read_preference.js | 18 |
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 e2701139126..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"}}); })(); |