mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
12 lines
227 B
JavaScript
12 lines
227 B
JavaScript
db = connect( "test" );
|
|
t = db.find3;
|
|
t.drop();
|
|
|
|
for ( i=1; i<=50; i++)
|
|
t.save( { a : i } );
|
|
|
|
assert.eq( 50 , t.find().toArray().length );
|
|
assert.eq( 20 , t.find().limit(20).toArray().length );
|
|
|
|
assert(t.validate().valid);
|