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

Commit 6ac2eb8

Browse files
author
Tim Kuijsten
committed
add test to check for key range error handling
1 parent c1b6428 commit 6ac2eb8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/custom-tests.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,19 @@ module.exports.all = function(leveljs, tape, testCommon) {
7575
})
7676
})
7777

78+
tape('zero results if gt key > lt key', function(t) {
79+
var level = levelup('key-range-test', {db: leveljs})
80+
level.open(function(err) {
81+
t.notOk(err, 'no error')
82+
var s = level.createReadStream({ gte: 'x', lt: 'b' });
83+
var item;
84+
s.on('readable', function() {
85+
item = s.read()
86+
})
87+
s.on('end', function() {
88+
t.end()
89+
});
90+
})
91+
})
92+
7893
}

0 commit comments

Comments
 (0)