diff options
Diffstat (limited to 'jstests/aggregation/bugs/server4638.js')
-rw-r--r-- | jstests/aggregation/bugs/server4638.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/jstests/aggregation/bugs/server4638.js b/jstests/aggregation/bugs/server4638.js index 7d0f4b67e34..4934da94a34 100644 --- a/jstests/aggregation/bugs/server4638.js +++ b/jstests/aggregation/bugs/server4638.js @@ -4,15 +4,13 @@ t = db.server4638; t.drop(); -t.insert( { _id : 0 , x : 0 , undef: undefined } ); +t.insert({_id: 0, x: 0, undef: undefined}); // Make sure having an undefined doesn't break pipelines not using the field -res = t.aggregate( { $project : { x : 1 } } ).toArray(); +res = t.aggregate({$project: {x: 1}}).toArray(); assert.eq(res[0].x, 0); - // Make sure having an undefined doesn't break pipelines that do use the field -res = t.aggregate( { $project : { undef : 1 } } ).toArray(); +res = t.aggregate({$project: {undef: 1}}).toArray(); assert.eq(res[0].undef, undefined); assert.eq(typeof(res[0].undef), "undefined"); - |