diff options
Diffstat (limited to 'jstests/aggregation/bugs/server12015.js')
-rw-r--r-- | jstests/aggregation/bugs/server12015.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/jstests/aggregation/bugs/server12015.js b/jstests/aggregation/bugs/server12015.js index a9a8d6ab859..af4ee75f92d 100644 --- a/jstests/aggregation/bugs/server12015.js +++ b/jstests/aggregation/bugs/server12015.js @@ -8,11 +8,14 @@ load("jstests/aggregation/extras/utils.js"); // For orderedArrayEq. -(function (){ +(function() { "use strict"; var coll = db.server12015; coll.drop(); - var indexSpec = {a: 1, b: 1}; + var indexSpec = { + a: 1, + b: 1 + }; assert.writeOK(coll.insert({_id: 0, a: 0, b: 0})); assert.writeOK(coll.insert({_id: 1, a: 0, b: 1})); @@ -52,8 +55,8 @@ load("jstests/aggregation/extras/utils.js"); // For orderedArrayEq. // Non-blocking $sort, uncovered $project. assertResultsMatch([{$sort: {a: -1, b: -1}}, {$project: {_id: 1, a: 1, b: 1}}]); assertResultsMatch([{$sort: {a: 1, b: 1}}, {$project: {_id: 1, a: 1, b: 1}}]); - assertResultsMatch([{$sort: {a: 1, b: 1}}, - {$group: {_id: "$_id", arr: {$push: "$a"}, sum: {$sum: "$b"}}}]); + assertResultsMatch( + [{$sort: {a: 1, b: 1}}, {$group: {_id: "$_id", arr: {$push: "$a"}, sum: {$sum: "$b"}}}]); // Non-blocking $sort, covered $project. assertResultsMatch([{$sort: {a: -1, b: -1}}, {$project: {_id: 0, a: 1, b: 1}}]); @@ -62,8 +65,8 @@ load("jstests/aggregation/extras/utils.js"); // For orderedArrayEq. // Blocking $sort, uncovered $project. assertResultsMatch([{$sort: {b: 1, a: -1}}, {$project: {_id: 1, a: 1, b: 1}}]); - assertResultsMatch([{$sort: {b: 1, a: -1}}, - {$group: {_id: "$_id", arr: {$push: "$a"}, sum: {$sum: "$b"}}}]); + assertResultsMatch( + [{$sort: {b: 1, a: -1}}, {$group: {_id: "$_id", arr: {$push: "$a"}, sum: {$sum: "$b"}}}]); // Blocking $sort, covered $project. assertResultsMatch([{$sort: {b: 1, a: -1}}, {$project: {_id: 0, a: 1, b: 1}}]); |