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/core/grow_hash_table.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/grow_hash_table.js')
-rw-r--r-- | jstests/core/grow_hash_table.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/jstests/core/grow_hash_table.js b/jstests/core/grow_hash_table.js index 0c782444a2d..b26baae31af 100644 --- a/jstests/core/grow_hash_table.js +++ b/jstests/core/grow_hash_table.js @@ -11,9 +11,13 @@ var testDB = db.getSiblingDB('grow_hash_table'); var doTest = function(count) { print('Testing with count of ' + count); testDB.dropDatabase(); - var id = { data: 1 }; - var doc = { _id: id }; - var projection = { }; + var id = { + data: 1 + }; + var doc = { + _id: id + }; + var projection = {}; // Create a document and a projection with fields r1, r2, r3 ... for (var i = 1; i <= count; ++i) { @@ -27,11 +31,10 @@ var doTest = function(count) { // Try to read the document using a large projection try { - var findCount = testDB.collection.find({ _id: id }, projection).itcount(); + var findCount = testDB.collection.find({_id: id}, projection).itcount(); assert(findCount == 1, 'Failed to find single stored document, find().itcount() == ' + findCount); - } - catch (e) { + } catch (e) { testDB.dropDatabase(); doassert('Test FAILED! Caught exception ' + tojsononeline(e)); } |