Files
mongo/jstests/core/js9.js
Siyuan Zhou 3660343e0b SERVER-12127 migrate js tests to jscore suite when not related to writes
Migrate js tests starting from j-z.
Include SERVER-12920 Update use_power_of_2.js

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
2014-03-03 22:54:10 -05:00

25 lines
479 B
JavaScript

c = db.jstests_js9;
c.drop();
c.save( { a : 1 } );
c.save( { a : 2 } );
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;
}
)
)