handle empty set, add test

This commit is contained in:
Barış Soner Uşaklı
2018-11-11 15:39:17 -05:00
parent afa6c71b72
commit f8e219c323
3 changed files with 14 additions and 7 deletions

View File

@@ -139,6 +139,14 @@ describe('Sorted Set methods', function () {
done();
});
});
it('should return empty array if keys is empty array', function (done) {
db.getSortedSetRange([], 0, -1, function (err, data) {
assert.ifError(err);
assert.deepStrictEqual(data, []);
done();
});
});
});
describe('getSortedSetRevRange()', function () {