diff options
Diffstat (limited to 'jstests/aggregation/bugs/server4588.js')
-rw-r--r-- | jstests/aggregation/bugs/server4588.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/jstests/aggregation/bugs/server4588.js b/jstests/aggregation/bugs/server4588.js index ba49c78e9ea..49f41283f6d 100644 --- a/jstests/aggregation/bugs/server4588.js +++ b/jstests/aggregation/bugs/server4588.js @@ -13,7 +13,12 @@ // Without includeArrayIndex. var actualResults = coll.aggregate([{$unwind: {path: "$x"}}]).toArray(); - var expectedResults = [{_id: 3, x: 1}, {_id: 3, x: 2}, {_id: 3, x: 3}, {_id: 4, x: 5}, ]; + var expectedResults = [ + {_id: 3, x: 1}, + {_id: 3, x: 2}, + {_id: 3, x: 3}, + {_id: 4, x: 5}, + ]; assert.eq(expectedResults, actualResults, "Incorrect results for normal $unwind"); // With includeArrayIndex, index inserted into a new field. @@ -28,9 +33,12 @@ // With both includeArrayIndex and preserveNullAndEmptyArrays. // TODO: update this test when SERVER-20168 is resolved. - actualResults = coll.aggregate([{ - $unwind: {path: "$x", includeArrayIndex: "index", preserveNullAndEmptyArrays: true} - }]).toArray(); + actualResults = + coll.aggregate([{ + $unwind: + {path: "$x", includeArrayIndex: "index", preserveNullAndEmptyArrays: true} + }]) + .toArray(); expectedResults = [ {_id: 0, index: null}, {_id: 1, x: null, index: null}, |