mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
remove unnecessary checks
This commit is contained in:
@@ -69,6 +69,15 @@ describe('Sorted Set methods', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should return empty array if set does not exist', function (done) {
|
||||
db.getSortedSetRange('doesnotexist', 0, -1, function (err, values) {
|
||||
assert.ifError(err);
|
||||
assert(Array.isArray(values));
|
||||
assert.equal(values.length, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSortedSetRevRange()', function () {
|
||||
@@ -122,6 +131,15 @@ describe('Sorted Set methods', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should return empty array if set does not exist', function (done) {
|
||||
db.getSortedSetRangeByScore('doesnotexist', 0, -1, '-inf', 0, function (err, values) {
|
||||
assert.ifError(err);
|
||||
assert(Array.isArray(values));
|
||||
assert.equal(values.length, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSortedSetRevRangeByScore()', function () {
|
||||
|
||||
Reference in New Issue
Block a user