Skip to content

Commit

Permalink
Added (failing) test case find-sort-many to demonstrate that sort doe…
Browse files Browse the repository at this point in the history
…s not work for more than 1000 results
  • Loading branch information
olegam committed Mar 10, 2016
1 parent 1377b20 commit 459a5f9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test-find-sort-many.js
@@ -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()
})
})

0 comments on commit 459a5f9

Please sign in to comment.