mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
handle empty set, add test
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user