Ole Gammelgaard Poulsen
9 years ago
1 changed files with 18 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||
var insert = require('./insert') |
|||
|
|||
var numTestDocs = 1500 |
|||
var testDocs= [] |
|||
for (var i=0; i < numTestDocs; i++) { |
|||
var document = { |
|||
name: 'test-doc-' + i |
|||
} |
|||
testDocs.push(document) |
|||
} |
|||
|
|||
insert('sort-many', testDocs, function (db, t, done) { |
|||
db.a.find().sort({name: 1}, function (err, docs) { |
|||
t.error(err) |
|||
t.equal(docs.length, numTestDocs) |
|||
t.end() |
|||
}) |
|||
}) |
Loading…
Reference in new issue