mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 10:17:15 +02: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