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>
13 lines
297 B
JavaScript
13 lines
297 B
JavaScript
|
|
|
|
t = db.jstests_js1;
|
|
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() );
|
|
|
|
assert(t.validate().valid);
|