Browse Source

Added (failing) test case find-sort-many to demonstrate that sort does not work for more than 1000 results

master
Ole Gammelgaard Poulsen 9 years ago
parent
commit
459a5f9a54
  1. 18
      test/test-find-sort-many.js

18
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()
})
})
Loading…
Cancel
Save