From 588301aa12b277f2d304b42a27780406347207ce Mon Sep 17 00:00:00 2001 From: Tim Kuijsten Date: Fri, 5 Feb 2016 00:53:49 +0100 Subject: [PATCH] add test to check for key range error handling --- test/custom-tests.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/custom-tests.js b/test/custom-tests.js index f6b801b..8cdbb5c 100644 --- a/test/custom-tests.js +++ b/test/custom-tests.js @@ -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() + }); + }) + }) + }