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/core/pushall.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/pushall.js')
-rw-r--r-- | jstests/core/pushall.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/jstests/core/pushall.js b/jstests/core/pushall.js index 736d3a3fc14..e9d388e6f6f 100644 --- a/jstests/core/pushall.js +++ b/jstests/core/pushall.js @@ -1,18 +1,18 @@ t = db.jstests_pushall; t.drop(); -t.save( { _id: 1, a: [ 1, 2, 3 ] } ); -t.update( { _id: 1 }, { $pushAll: { a: [ 4 ] } } ); -assert.eq( [ 1, 2, 3, 4 ], t.findOne( { _id: 1 } ).a ); -t.update( {}, { $pushAll: { a: [ 4 ] } } ); -assert.eq( [ 1, 2, 3, 4, 4 ], t.findOne( { _id: 1 } ).a ); +t.save({_id: 1, a: [1, 2, 3]}); +t.update({_id: 1}, {$pushAll: {a: [4]}}); +assert.eq([1, 2, 3, 4], t.findOne({_id: 1}).a); +t.update({}, {$pushAll: {a: [4]}}); +assert.eq([1, 2, 3, 4, 4], t.findOne({_id: 1}).a); -t.save( { _id: 2, a: [ 1, 2, 3 ] } ); -t.update( { _id: 2 }, { $pushAll: { a: [ 4, 5 ] } } ); -assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne( { _id: 2 } ).a ); -t.update( { _id: 2 }, { $pushAll: { a: [] } } ); -assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne( { _id: 2 } ).a ); +t.save({_id: 2, a: [1, 2, 3]}); +t.update({_id: 2}, {$pushAll: {a: [4, 5]}}); +assert.eq([1, 2, 3, 4, 5], t.findOne({_id: 2}).a); +t.update({_id: 2}, {$pushAll: {a: []}}); +assert.eq([1, 2, 3, 4, 5], t.findOne({_id: 2}).a); -t.save( { _id: 3 } ); -t.update( { _id: 3 }, { $pushAll: { a: [ 1, 2 ] } } ); -assert.eq( [ 1, 2 ], t.findOne( { _id: 3 } ).a ); +t.save({_id: 3}); +t.update({_id: 3}, {$pushAll: {a: [1, 2]}}); +assert.eq([1, 2], t.findOne({_id: 3}).a); |