mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
remove dupe code in mongodb sorted
This commit is contained in:
@@ -201,6 +201,17 @@ describe('Sorted Set methods', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should return elements from 3 to last', function (done) {
|
||||
db.sortedSetAdd('partialZset', [1, 2, 3, 4, 5], ['value1', 'value2', 'value3', 'value4', 'value5'], function (err) {
|
||||
assert.ifError(err);
|
||||
db.getSortedSetRangeByScore('partialZset', 3, 10, '-inf', '+inf', function (err, data) {
|
||||
assert.ifError(err);
|
||||
assert.deepStrictEqual(data, ['value4', 'value5']);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSortedSetRevRangeByScore()', function () {
|
||||
|
||||
Reference in New Issue
Block a user