summaryrefslogtreecommitdiff
path: root/jstests/core/updatek.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/updatek.js')
-rw-r--r--jstests/core/updatek.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/jstests/core/updatek.js b/jstests/core/updatek.js
index b96f3138a81..1af9e6112e7 100644
--- a/jstests/core/updatek.js
+++ b/jstests/core/updatek.js
@@ -3,12 +3,11 @@
t = db.jstests_updatek;
t.drop();
-t.save( { _id:0, '1':{}, '01':{} } );
-t.update( {}, { $set:{ '1.b':1, '1.c':2 } } );
-assert.docEq( { "01" : { }, "1" : { "b" : 1, "c" : 2 }, "_id" : 0 }, t.findOne() );
+t.save({_id: 0, '1': {}, '01': {}});
+t.update({}, {$set: {'1.b': 1, '1.c': 2}});
+assert.docEq({"01": {}, "1": {"b": 1, "c": 2}, "_id": 0}, t.findOne());
t.drop();
-t.save( { _id:0, '1':{}, '01':{} } );
-t.update( {}, { $set:{ '1.b':1, '01.c':2 } } );
-assert.docEq( { "01" : { "c" : 2 }, "1" : { "b" : 1 }, "_id" : 0 }, t.findOne() );
-
+t.save({_id: 0, '1': {}, '01': {}});
+t.update({}, {$set: {'1.b': 1, '01.c': 2}});
+assert.docEq({"01": {"c": 2}, "1": {"b": 1}, "_id": 0}, t.findOne());