diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:17:50 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:18:14 -0500 |
commit | 4ae691e8edc87d0e3cfb633bb91c328426be007b (patch) | |
tree | 52079a593f54382ca13a2e741633eab1b6271893 /jstests/aggregation/bugs/server6269.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/aggregation/bugs/server6269.js')
-rw-r--r-- | jstests/aggregation/bugs/server6269.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/jstests/aggregation/bugs/server6269.js b/jstests/aggregation/bugs/server6269.js index 181eaa6835f..c92245f6198 100644 --- a/jstests/aggregation/bugs/server6269.js +++ b/jstests/aggregation/bugs/server6269.js @@ -3,12 +3,11 @@ c = db.jstests_aggregation_server6269; c.drop(); -c.save( { _id:0, a:[ 1, 2, 3 ] } ); +c.save({_id: 0, a: [1, 2, 3]}); // The unwound a:1 document is skipped, but the remainder are returned. -assert.eq( [ { _id:0, a:2 }, { _id:0, a:3 } ], - c.aggregate( { $unwind:'$a' }, { $skip:1 } ).toArray() ); +assert.eq([{_id: 0, a: 2}, {_id: 0, a: 3}], c.aggregate({$unwind: '$a'}, {$skip: 1}).toArray()); // Test with two documents. -c.save( { _id:1, a:[ 4, 5, 6 ] } ); -assert.eq( [ { _id:0, a:3 }, { _id:1, a:4 }, { _id:1, a:5 }, { _id:1, a:6 } ], - c.aggregate( { $unwind:'$a' }, { $skip:2 } ).toArray() ); +c.save({_id: 1, a: [4, 5, 6]}); +assert.eq([{_id: 0, a: 3}, {_id: 1, a: 4}, {_id: 1, a: 5}, {_id: 1, a: 6}], + c.aggregate({$unwind: '$a'}, {$skip: 2}).toArray()); |