mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 15:42:52 +01:00
fix lex tests maybe
This commit is contained in:
@@ -582,7 +582,7 @@ module.exports = function (db, module) {
|
||||
sortedSetLex(key, min, max, 1, start, count, callback);
|
||||
};
|
||||
|
||||
module.getSortedSetRevRangeByLex = function (key, min, max, start, count, callback) {
|
||||
module.getSortedSetRevRangeByLex = function (key, max, min, start, count, callback) {
|
||||
sortedSetLex(key, min, max, -1, start, count, callback);
|
||||
};
|
||||
|
||||
@@ -599,7 +599,7 @@ module.exports = function (db, module) {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
var query = {_key: key, value: {}};
|
||||
var query = {_key: key};
|
||||
|
||||
if (min !== '-') {
|
||||
if (min.match(/^\(/)) {
|
||||
|
||||
@@ -302,7 +302,9 @@ module.exports = function (redisClient, module) {
|
||||
|
||||
module.sortedSetRemoveRangeByLex = function (key, min, max, callback) {
|
||||
callback = callback || helpers.noop;
|
||||
sortedSetLex('zremrangebylex', false, key, min, max, callback);
|
||||
sortedSetLex('zremrangebylex', false, key, min, max, function (err) {
|
||||
callback(err);
|
||||
});
|
||||
};
|
||||
|
||||
module.sortedSetLexCount = function (key, min, max, callback) {
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('Sorted Set methods', function () {
|
||||
db.sortedSetAdd('sortedSetTest3', [2, 4], ['value2', 'value4'], next);
|
||||
},
|
||||
function (next) {
|
||||
db.sortedSetAdd('sortedSetLex', [0, 0, 0, 0], ['a', 'b', 'c', 'd'], done);
|
||||
db.sortedSetAdd('sortedSetLex', [0, 0, 0, 0], ['a', 'b', 'c', 'd'], next);
|
||||
}
|
||||
], done);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user