Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
add test to check for key range error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Kuijsten committed Feb 4, 2016
1 parent c1b6428 commit 588301a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/custom-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,19 @@ module.exports.all = function(leveljs, tape, testCommon) {
})
})

tape('zero results if lt > gt key', function(t) {
var level = levelup('key-range-test', {db: leveljs})
level.open(function(err) {
t.notOk(err, 'no error')
var s = level.createReadStream({ gte: 'x', lt: 'b' });
var item;
s.on('readable', function() {
item = s.read()
})
s.on('end', function() {
t.end()
});
})
})

}

0 comments on commit 588301a

Please sign in to comment.