summaryrefslogtreecommitdiff
path: root/jstests/core/arrayfindb.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:27:20 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:27:56 -0500
commit8c5ff5834ab1f61e68b7839cd99c3de1f87c2121 (patch)
treeef4d91cc230300a6a48eeeac696ca15df6db1212 /jstests/core/arrayfindb.js
parent0875be78b405016736ff42e3a50166be7561c2f8 (diff)
downloadmongo-8c5ff5834ab1f61e68b7839cd99c3de1f87c2121.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/arrayfindb.js')
-rw-r--r--jstests/core/arrayfindb.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/jstests/core/arrayfindb.js b/jstests/core/arrayfindb.js
index ad1a86be142..483e1e46134 100644
--- a/jstests/core/arrayfindb.js
+++ b/jstests/core/arrayfindb.js
@@ -5,11 +5,13 @@ t.drop();
// Case #1: Ensure correct matching for $elemMatch with an embedded $and (SERVER-13664).
t.save({a: [{b: 1, c: 25}, {a: 3, b: 59}]});
-assert.eq(0, t.find({a: {$elemMatch: {b: {$gte: 2, $lt: 4}, c: 25}}}).itcount(),
+assert.eq(0,
+ t.find({a: {$elemMatch: {b: {$gte: 2, $lt: 4}, c: 25}}}).itcount(),
"Case #1: wrong number of results returned -- unindexed");
t.ensureIndex({"a.b": 1, "a.c": 1});
-assert.eq(0, t.find({a: {$elemMatch: {b: {$gte: 2, $lt: 4}, c: 25}}}).itcount(),
+assert.eq(0,
+ t.find({a: {$elemMatch: {b: {$gte: 2, $lt: 4}, c: 25}}}).itcount(),
"Case #1: wrong number of results returned -- indexed");
// Case #2: Ensure correct matching for $elemMatch with an embedded $or.
@@ -17,10 +19,12 @@ t.drop();
t.save({a: [{b: 1}, {c: 1}]});
t.save({a: [{b: 2}, {c: 1}]});
t.save({a: [{b: 1}, {c: 2}]});
-assert.eq(2, t.find({a: {$elemMatch: {$or: [{b: 2}, {c: 2}]}}}).itcount(),
+assert.eq(2,
+ t.find({a: {$elemMatch: {$or: [{b: 2}, {c: 2}]}}}).itcount(),
"Case #2: wrong number of results returned -- unindexed");
t.ensureIndex({"a.b": 1});
t.ensureIndex({"a.c": 1});
-assert.eq(2, t.find({a: {$elemMatch: {$or: [{b: 2}, {c: 2}]}}}).itcount(),
+assert.eq(2,
+ t.find({a: {$elemMatch: {$or: [{b: 2}, {c: 2}]}}}).itcount(),
"Case #2: wrong number of results returned -- indexed");