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/exists3.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/exists3.js')
-rw-r--r-- | jstests/core/exists3.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/jstests/core/exists3.js b/jstests/core/exists3.js index c61f022939c..e4ce03437bb 100644 --- a/jstests/core/exists3.js +++ b/jstests/core/exists3.js @@ -5,17 +5,17 @@ t.drop(); t.insert({a: 1, b: 2}); -assert.eq( 1, t.find({}).sort({c: -1}).itcount() ); -assert.eq( 1, t.count({c: {$exists: false}}) ); -assert.eq( 1, t.find({c: {$exists: false}}).itcount() ); -assert.eq( 1, t.find({c: {$exists: false}}).sort({c: -1}).itcount() ); +assert.eq(1, t.find({}).sort({c: -1}).itcount()); +assert.eq(1, t.count({c: {$exists: false}})); +assert.eq(1, t.find({c: {$exists: false}}).itcount()); +assert.eq(1, t.find({c: {$exists: false}}).sort({c: -1}).itcount()); -// now we have an index on the sort key +// now we have an index on the sort key t.ensureIndex({c: -1}); -assert.eq( 1, t.find({c: {$exists: false}}).sort({c: -1}).itcount() ); -assert.eq( 1, t.find({c: {$exists: false}}).itcount() ); -// still ok without the $exists -assert.eq( 1, t.find({}).sort({c: -1}).itcount() ); -// and ok with a convoluted $not $exists -assert.eq( 1, t.find({c: {$not: {$exists: true}}}).sort({c: -1}).itcount() ); +assert.eq(1, t.find({c: {$exists: false}}).sort({c: -1}).itcount()); +assert.eq(1, t.find({c: {$exists: false}}).itcount()); +// still ok without the $exists +assert.eq(1, t.find({}).sort({c: -1}).itcount()); +// and ok with a convoluted $not $exists +assert.eq(1, t.find({c: {$not: {$exists: true}}}).sort({c: -1}).itcount()); |