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>
18 lines
349 B
JavaScript
18 lines
349 B
JavaScript
|
|
t = db.set5;
|
|
t.drop();
|
|
|
|
function check( want , err ){
|
|
var x = t.findOne();
|
|
delete x._id;
|
|
assert.docEq( want , x , err );
|
|
}
|
|
|
|
t.update( { a : 5 } , { $set : { a : 6 , b : null } } , true );
|
|
check( { a : 6 , b : null } , "A" )
|
|
|
|
t.drop();
|
|
|
|
t.update( { z : 5 } , { $set : { z : 6 , b : null } } , true );
|
|
check( { b : null , z : 6 } , "B" )
|