diff options
Diffstat (limited to 'jstests/core/js9.js')
-rw-r--r-- | jstests/core/js9.js | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/jstests/core/js9.js b/jstests/core/js9.js index 286adb9a1a4..b29a31afdc4 100644 --- a/jstests/core/js9.js +++ b/jstests/core/js9.js @@ -1,24 +1,17 @@ c = db.jstests_js9; c.drop(); -c.save( { a : 1 } ); -c.save( { a : 2 } ); +c.save({a: 1}); +c.save({a: 2}); +assert.eq(2, c.find().length()); +assert.eq(2, c.find().count()); -assert.eq( 2 , c.find().length() ); -assert.eq( 2 , c.find().count() ); - - -assert.eq( 2 , - db.eval( - function(){ - num = 0; - db.jstests_js9.find().forEach( - function(z){ - num++; - } - ); - return num; - } - ) - ); +assert.eq(2, + db.eval(function() { + num = 0; + db.jstests_js9.find().forEach(function(z) { + num++; + }); + return num; + })); |