summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server6361.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/bugs/server6361.js')
-rw-r--r--jstests/aggregation/bugs/server6361.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/aggregation/bugs/server6361.js b/jstests/aggregation/bugs/server6361.js
index 86eddd2b4e8..873c08f43da 100644
--- a/jstests/aggregation/bugs/server6361.js
+++ b/jstests/aggregation/bugs/server6361.js
@@ -6,22 +6,22 @@ load('jstests/aggregation/extras/utils.js');
c = db.c;
c.drop();
-c.insert({a:2, nested: {_id:2, other:2}});
-assertErrorCode(c, {$project: {a:0}}, 16406);
+c.insert({a: 2, nested: {_id: 2, other: 2}});
+assertErrorCode(c, {$project: {a: 0}}, 16406);
// excluding top-level _id is still allowed
-res = c.aggregate({$project: {_id:0, a:1}});
-assert.eq(res.toArray()[0], {a:2});
+res = c.aggregate({$project: {_id: 0, a: 1}});
+assert.eq(res.toArray()[0], {a: 2});
// excluding nested _id is not
-assertErrorCode(c, {$project: {'nested._id':0}}, 16406);
+assertErrorCode(c, {$project: {'nested._id': 0}}, 16406);
// nested _id is not automatically included
-res = c.aggregate({$project: {_id:0, 'nested.other':1}});
-assert.eq(res.toArray()[0], {nested: {other:2}});
+res = c.aggregate({$project: {_id: 0, 'nested.other': 1}});
+assert.eq(res.toArray()[0], {nested: {other: 2}});
// not including anything is an error
assertErrorCode(c, {$project: {}}, 16403);
// even if you exclude _id
-assertErrorCode(c, {$project: {'_id':0}}, 16403);
+assertErrorCode(c, {$project: {'_id': 0}}, 16403);