diff options
Diffstat (limited to 'jstests/core/js1.js')
-rw-r--r-- | jstests/core/js1.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/jstests/core/js1.js b/jstests/core/js1.js index 240d9f82fbb..89910f4bd23 100644 --- a/jstests/core/js1.js +++ b/jstests/core/js1.js @@ -1,12 +1,22 @@ t = db.jstests_js1; -t.remove( {} ); +t.remove({}); -t.save( { z : 1 } ); -t.save( { z : 2 } ); -assert( 2 == t.find().length() ); -assert( 2 == t.find( { $where : function(){ return 1; } } ).length() ); -assert( 1 == t.find( { $where : function(){ return obj.z == 2; } } ).length() ); +t.save({z: 1}); +t.save({z: 2}); +assert(2 == t.find().length()); +assert(2 == + t.find({ + $where: function() { + return 1; + } + }).length()); +assert(1 == + t.find({ + $where: function() { + return obj.z == 2; + } + }).length()); assert(t.validate().valid); |