summaryrefslogtreecommitdiff
path: root/jstests/core/set6.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/core/set6.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/set6.js')
-rw-r--r--jstests/core/set6.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/jstests/core/set6.js b/jstests/core/set6.js
index 87a8100d232..bf0ece0dbf8 100644
--- a/jstests/core/set6.js
+++ b/jstests/core/set6.js
@@ -2,19 +2,21 @@
t = db.set6;
t.drop();
-x = { _id : 1 , r : new DBRef( "foo" , new ObjectId() ) };
-t.insert( x );
-assert.eq( x , t.findOne() , "A" );
+x = {
+ _id: 1,
+ r: new DBRef("foo", new ObjectId())
+};
+t.insert(x);
+assert.eq(x, t.findOne(), "A");
x.r.$id = new ObjectId();
-t.update({}, { $set : { r : x.r } } );
-assert.eq( x , t.findOne() , "B");
+t.update({}, {$set: {r: x.r}});
+assert.eq(x, t.findOne(), "B");
-x.r2 = new DBRef( "foo2" , 5 );
-t.update( {} , { $set : { "r2" : x.r2 } } );
-assert.eq( x , t.findOne() , "C" );
+x.r2 = new DBRef("foo2", 5);
+t.update({}, {$set: {"r2": x.r2}});
+assert.eq(x, t.findOne(), "C");
x.r.$id = 2;
-t.update( {} , { $set : { "r.$id" : 2 } } );
-assert.eq( x.r.$id , t.findOne().r.$id , "D");
-
+t.update({}, {$set: {"r.$id": 2}});
+assert.eq(x.r.$id, t.findOne().r.$id, "D");